#include <bits/stdc++.h>
using namespace std;
const long long INFi = 1e9 + 5;
const long long maxN = 3e5 + 5;
const long long md = 998244353;
const long long INF = 2e18;
double getTime() { return clock() / (double)CLOCKS_PER_SEC; }
inline long long add(const long long &a, const long long &b) {
  return a + b >= md ? a + b - md : a + b;
}
inline long long sub(const long long &a, const long long &b) {
  return a - b < 0 ? a - b + md : a - b;
}
inline long long mul(const long long &a, const long long &b) {
  return (1ll * a * b) % md;
}
long long binpow(long long a, long long b) {
  if (b <= 0) return 1;
  if (b % 2) return mul(a, binpow(a, b - 1));
  long long m = binpow(a, b / 2);
  return mul(m, m);
}
long long rev(long long a) { return binpow(a, md - 2); }
const long long maxF = 3e5 + 5;
long long fact[maxF];
long long rfact[maxF];
void init() {
  fact[0] = 1;
  for (long long i = 1; i < maxF; ++i) fact[i] = mul(fact[i - 1], i);
  rfact[maxF - 1] = rev(fact[maxF - 1]);
  for (long long i = maxF - 1; i >= 1; --i) {
    rfact[i - 1] = mul(rfact[i], i);
  }
}
long long C(long long n, long long k) {
  if (k < 0 || n < k) return 0;
  return mul(fact[n], mul(rfact[k], rfact[n - k]));
}
long long psq[maxN];
void initFFT() {
  long long s = 31;
  for (long long i = (1 << 23); i >= 1; i /= 2, s = mul(s, s)) {
    if (i < maxN) psq[i] = s;
  }
}
void fft(vector<long long> &s, vector<long long> &res, long long n, long long x,
         long long ss = 0, long long step = 1, long long rs = 0) {
  if (n == 1) {
    res[rs] = s[ss];
    return;
  }
  fft(s, res, n / 2, mul(x, x), ss, step * 2, rs);
  fft(s, res, n / 2, mul(x, x), ss + step, step * 2, rs + n / 2);
  long long c = 1;
  for (long long i = rs; i < rs + n / 2; ++i) {
    auto a = res[i], b = res[i + n / 2];
    res[i] = add(a, mul(b, c));
    res[i + n / 2] = sub(a, mul(b, c));
    c = mul(c, x);
  }
}
vector<long long> multiply(vector<long long> &a, vector<long long> &b) {
  vector<long long> as(a.begin(), (a).end()), bs(b.begin(), (b).end());
  long long n = 1;
  while (n < a.size() || n < b.size()) n *= 2;
  n *= 2;
  as.resize(n);
  bs.resize(n);
  long long t = psq[n];
  vector<long long> resa(n), resb(n);
  fft(as, resa, n, t);
  fft(bs, resb, n, t);
  for (long long i = 0; i < (n); ++i) resa[i] = mul(resa[i], resb[i]);
  t = rev(t);
  fft(resa, as, n, t);
  long long rn = rev(n);
  for (long long i = 0; i < (n); ++i) as[i] = mul(as[i], rn);
  return as;
}
long long cnt[maxN];
vector<long long> aboba(long long l, long long r) {
  if (l >= r) return {0, 1};
  if (l + 1 == r) {
    return {cnt[l], 1};
  }
  long long m = (l + r + 1) / 2;
  vector<long long> a1 = aboba(l, m), a2 = aboba(m, r);
  vector<long long> a3 = multiply(a1, a2);
  while ((long long)a3.size() > 1 && a3.back() == 0) {
    a3.pop_back();
  }
  return a3;
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long n;
  cin >> n;
  long long a, b;
  vector<vector<long long>> g(n);
  for (long long i = 0; i < n - 1; i++) {
    cin >> a >> b;
    a--;
    b--;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  vector<long long> par(n);
  vector<bool> used(n, false);
  vector<long long> st = {0};
  used[0] = true;
  while (!st.empty()) {
    long long v = st.back();
    st.pop_back();
    for (auto u : g[v]) {
      if (!used[u]) {
        cnt[v]++;
        used[u] = true;
        st.push_back(u);
      }
    }
  }
  init();
  initFFT();
  vector<long long> kekis = aboba(0, n);
  long long ans = fact[n];
  for (long long w = 1; w < n; w++) {
    long long kek = fact[n - w];
    kek = mul(kek, kekis[n - w]);
    if (w % 2 == 0) {
      ans = add(ans, kek);
    } else {
      ans = add(ans, (md - kek) % md);
    }
  }
  ans %= md;
  cout << ans << '\n';
}

### Prompt

Please create a solution in Cpp to the following problem:

You are given a rooted tree consisting of n vertices numbered from 1 to n. The root of the tree is the vertex 1.

You have to color all vertices of the tree into n colors (also numbered from 1 to n) so that there is exactly one vertex for each color. Let c_i be the color of vertex i, and p_i be the parent of vertex i in the rooted tree. The coloring is considered beautiful if there is no vertex k (k > 1) such that c_k = c_{p_k} - 1, i. e. no vertex such that its color is less than the color of its parent by exactly 1.

Calculate the number of beautiful colorings, and print it modulo 998244353.

Input

The first line contains one integer n (2 ≤ n ≤ 250000) — the number of vertices in the tree.

Then n-1 lines follow, the i-th line contains two integers x_i and y_i (1 ≤ x_i, y_i ≤ n; x_i ≠ y_i) denoting an edge between the vertex x_i and the vertex y_i. These edges form a tree.

Output

Print one integer — the number of beautiful colorings, taken modulo 998244353.

Examples

Input


5
1 2
3 2
4 2
2 5


Output


42


Input


5
1 2
2 3
3 4
4 5


Output


53


Input


20
20 19
20 4
12 4
5 8
1 2
20 7
3 10
7 18
11 8
9 10
17 10
1 15
11 16
14 11
18 10
10 1
14 2
13 17
20 6


Output


955085064

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const long long INFi = 1e9 + 5;
const long long maxN = 3e5 + 5;
const long long md = 998244353;
const long long INF = 2e18;
double getTime() { return clock() / (double)CLOCKS_PER_SEC; }
inline long long add(const long long &a, const long long &b) {
  return a + b >= md ? a + b - md : a + b;
}
inline long long sub(const long long &a, const long long &b) {
  return a - b < 0 ? a - b + md : a - b;
}
inline long long mul(const long long &a, const long long &b) {
  return (1ll * a * b) % md;
}
long long binpow(long long a, long long b) {
  if (b <= 0) return 1;
  if (b % 2) return mul(a, binpow(a, b - 1));
  long long m = binpow(a, b / 2);
  return mul(m, m);
}
long long rev(long long a) { return binpow(a, md - 2); }
const long long maxF = 3e5 + 5;
long long fact[maxF];
long long rfact[maxF];
void init() {
  fact[0] = 1;
  for (long long i = 1; i < maxF; ++i) fact[i] = mul(fact[i - 1], i);
  rfact[maxF - 1] = rev(fact[maxF - 1]);
  for (long long i = maxF - 1; i >= 1; --i) {
    rfact[i - 1] = mul(rfact[i], i);
  }
}
long long C(long long n, long long k) {
  if (k < 0 || n < k) return 0;
  return mul(fact[n], mul(rfact[k], rfact[n - k]));
}
long long psq[maxN];
void initFFT() {
  long long s = 31;
  for (long long i = (1 << 23); i >= 1; i /= 2, s = mul(s, s)) {
    if (i < maxN) psq[i] = s;
  }
}
void fft(vector<long long> &s, vector<long long> &res, long long n, long long x,
         long long ss = 0, long long step = 1, long long rs = 0) {
  if (n == 1) {
    res[rs] = s[ss];
    return;
  }
  fft(s, res, n / 2, mul(x, x), ss, step * 2, rs);
  fft(s, res, n / 2, mul(x, x), ss + step, step * 2, rs + n / 2);
  long long c = 1;
  for (long long i = rs; i < rs + n / 2; ++i) {
    auto a = res[i], b = res[i + n / 2];
    res[i] = add(a, mul(b, c));
    res[i + n / 2] = sub(a, mul(b, c));
    c = mul(c, x);
  }
}
vector<long long> multiply(vector<long long> &a, vector<long long> &b) {
  vector<long long> as(a.begin(), (a).end()), bs(b.begin(), (b).end());
  long long n = 1;
  while (n < a.size() || n < b.size()) n *= 2;
  n *= 2;
  as.resize(n);
  bs.resize(n);
  long long t = psq[n];
  vector<long long> resa(n), resb(n);
  fft(as, resa, n, t);
  fft(bs, resb, n, t);
  for (long long i = 0; i < (n); ++i) resa[i] = mul(resa[i], resb[i]);
  t = rev(t);
  fft(resa, as, n, t);
  long long rn = rev(n);
  for (long long i = 0; i < (n); ++i) as[i] = mul(as[i], rn);
  return as;
}
long long cnt[maxN];
vector<long long> aboba(long long l, long long r) {
  if (l >= r) return {0, 1};
  if (l + 1 == r) {
    return {cnt[l], 1};
  }
  long long m = (l + r + 1) / 2;
  vector<long long> a1 = aboba(l, m), a2 = aboba(m, r);
  vector<long long> a3 = multiply(a1, a2);
  while ((long long)a3.size() > 1 && a3.back() == 0) {
    a3.pop_back();
  }
  return a3;
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long n;
  cin >> n;
  long long a, b;
  vector<vector<long long>> g(n);
  for (long long i = 0; i < n - 1; i++) {
    cin >> a >> b;
    a--;
    b--;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  vector<long long> par(n);
  vector<bool> used(n, false);
  vector<long long> st = {0};
  used[0] = true;
  while (!st.empty()) {
    long long v = st.back();
    st.pop_back();
    for (auto u : g[v]) {
      if (!used[u]) {
        cnt[v]++;
        used[u] = true;
        st.push_back(u);
      }
    }
  }
  init();
  initFFT();
  vector<long long> kekis = aboba(0, n);
  long long ans = fact[n];
  for (long long w = 1; w < n; w++) {
    long long kek = fact[n - w];
    kek = mul(kek, kekis[n - w]);
    if (w % 2 == 0) {
      ans = add(ans, kek);
    } else {
      ans = add(ans, (md - kek) % md);
    }
  }
  ans %= md;
  cout << ans << '\n';
}

```