#include #include #define rep(i,n) for(int i=0; i using Modint = atcoder::static_modint<998244353>; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int N; cin >> N; vector C(N); rep(i,N*2-2){ int u; cin >> u; C[u-1]++; } vector F(N+1); F[0] = 1; for(int i=1; i<=N; i++) F[i] = F[i-1] * i; Modint ans = 1; rep(i,N) ans *= F[C[i]]; ans /= F[N-1]; cout << ans.val() << endl; return 0; }