#include #include using namespace std; long mod=1e9+7,F[2<<17]; long power(long a,long b){return b?power(a*a%mod,b/2)*(b%2?a:1)%mod:1;} int d[2<<17]; vectorG[2<<17]; void dfs(int u,int p,int di) { d[u]=di; for(int i=0;i>N; for(int i=1;i>a>>b; a--,b--; G[a].push_back(b); G[b].push_back(a); } dfs(0,-1,0); F[0]=1; for(int i=1;i<2<<17;i++)F[i]=F[i-1]*i%mod; long ans=0; for(int i=0;i