#include <cstdio>
#include <string.h>
#include <algorithm>
using namespace std;
#define N 100050
typedef long long ll;
int head[N],to[N<<1],nxt[N<<1],cnt,n,m,root[N],maxn;
int fa[N],top[N],siz[N],son[N],dep[N],dfn[N],S[N],out[N],t[N*39],tot,ls[N*39],rs[N*39];
inline void add(int u,int v) {
to[++cnt]=v; nxt[cnt]=head[u]; head[u]=cnt;
}
void insert(int &y,int x,int l,int r,int v,int c) {
y=++tot; t[y]=t[x]+c;
if(l==r) return ;
int mid=(l+r)>>1;
if(v<=mid) rs[y]=rs[x],insert(ls[y],ls[x],l,mid,v,c);
else ls[y]=ls[x],insert(rs[y],rs[x],mid+1,r,v,c);
}
int query(int a,int b,int c,int d,int l,int r,int x,int y) {
if(x<=l&&y>=r) return t[a]+t[b]-t[c]-t[d];
int mid=(l+r)>>1,re=0;
if(x<=mid) re+=query(ls[a],ls[b],ls[c],ls[d],l,mid,x,y);
if(y>mid) re+=query(rs[a],rs[b],rs[c],rs[d],mid+1,r,x,y);
return re;
}
void dfs1(int x,int y) {
S[++S[0]]=x; dfn[x]=++maxn;
int i; dep[x]=dep[y]+1; fa[x]=y; siz[x]=1;
for(i=head[x];i;i=nxt[i]) if(to[i]!=y) {
dfs1(to[i],x); siz[x]+=siz[to[i]];
if(siz[to[i]]>siz[son[x]]) son[x]=to[i];
}
out[x]=++maxn;
}
void dfs2(int x,int t) {
top[x]=t; int i; if(son[x]) dfs2(son[x],t);
for(i=head[x];i;i=nxt[i]) if(to[i]!=fa[x]&&to[i]!=son[x]) dfs2(to[i],to[i]);
}
int lca(int x,int y) {
while(top[x]!=top[y]) {
if(dep[top[x]]>dep[top[y]]) swap(x,y);
y=fa[top[y]];
}
return dep[x]<dep[y]?x:y;
}
ll gcd(ll x,ll y) {
return y?gcd(y,x%y):x;
}
int main() {
scanf("%d%d",&n,&m);
int i,x,y,j;
for(i=1;i<n;i++) {
scanf("%d%d",&x,&y);
add(x,y); add(y,x);
}
dfs1(1,0);
dfs2(1,1);
memset(head,0,sizeof(head)); cnt=0;
for(i=1;i<=m;i++) {
scanf("%d%d",&x,&y);
add(x,y);
}
for(j=1;j<=n;j++) {
x=S[j];
root[x]=root[fa[x]];
for(i=head[x];i;i=nxt[i]) {
y=to[i];
insert(root[x],root[x],1,maxn,dfn[y],1);
insert(root[x],root[x],1,maxn,out[y],-1);
}
}
ll ans=0,dev=1ll*m*(m-1)/2;;
for(x=1;x<=n;x++) {
for(i=head[x];i;i=nxt[i]) {
y=to[i];
int l=lca(x,y);
ans+=query(root[x],root[y],root[l],root[fa[l]],1,maxn,dfn[l],dfn[x]);
ans+=query(root[x],root[y],root[l],root[fa[l]],1,maxn,dfn[l],dfn[y]);
ans-=query(root[x],root[y],root[l],root[fa[l]],1,maxn,dfn[l],dfn[l]);
ans--;
}
}
ll tmp=gcd(ans,dev);
printf("%lld/%lld\n",ans/tmp,dev/tmp);
}