#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long int ll; typedef pair P; const ll MOD=1e9+7; ll powmod(ll a, ll k){ ll ap=a, ans=1; while(k>0){ if(k%2==1){ ans*=ap; ans%=MOD; } ap=ap*ap; ap%=MOD; k/=2; } return ans; } ll inv(ll a){ return powmod(a, MOD-2); } int main() { int n; cin>>n; if(n==1){ cout<<1< g[100000]; for(int i=0; i>a>>b; a--; b--; g[a].push_back(b); g[b].push_back(a); } int m=0; for(int i=1; i=0; i--) invf[i]=invf[i+1]*(i+1)%MOD; cout<