#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
const int mod = 998244353;
const int g = 3;
int Pow(long long a, int x, const int &mod) {
  long long res = 1;
  while (x) {
    if (x & 1) (res *= a) %= mod;
    (a *= a) %= mod;
    x >>= 1;
  }
  return res;
}
void NTT(int *a, int n, int rev) {
  for (int i = 0, j = 0; i < n; ++i) {
    if (i > j) swap(a[i], a[j]);
    for (int k = n >> 1; (j ^= k) < k; k >>= 1)
      ;
  }
  for (int i = 2; i <= n; i <<= 1) {
    int m = i >> 1;
    int w = Pow(g, (mod - 1) / i, mod);
    if (rev == -1) w = Pow(w, mod - 2, mod);
    for (int j = 0; j < n; j += i) {
      long long Wx = 1;
      for (int k = 0; k != m; k++) {
        long long z = a[j + m + k] * Wx % mod;
        a[j + m + k] = a[j + k] - z + mod;
        if (a[j + m + k] >= mod) a[j + m + k] -= mod;
        a[j + k] = a[j + k] + z;
        if (a[j + k] >= mod) a[j + k] -= mod;
        Wx = Wx * w % mod;
      }
    }
  }
  if (rev == -1) {
    long long inv = Pow(n, mod - 2, mod);
    for (int i = 0; i < n; i++) a[i] = a[i] * inv % mod;
  }
}
int len, Len, A[N], B[N];
long long ans, x, C[N];
int n, size[N];
vector<int> G[N];
vector<vector<int>> poly[N];
pair<vector<int>, vector<int>> value(vector<vector<int>> &poly) {
  pair<vector<int>, vector<int>> res;
  if (poly.size() == 1) {
    res = make_pair(poly[0], poly[0]);
    res.first[0]++;
    return res;
  }
  int mid = poly.size() >> 1;
  vector<vector<int>> L, R;
  for (int i = 0; i < mid; ++i) L.push_back(poly[i]);
  for (int i = mid; i < poly.size(); ++i) R.push_back(poly[i]);
  pair<vector<int>, vector<int>> l, r;
  l = value(L);
  r = value(R);
  len = 1;
  Len = l.first.size() + r.second.size() - 2;
  while (len <= Len) len <<= 1;
  for (int i = 0; i < len; ++i) A[i] = B[i] = 0;
  (l.first[0] += mod - 1) %= mod;
  for (int i = 0; i < l.first.size(); ++i) A[i] = l.first[i];
  for (int i = 0; i < r.second.size(); ++i) B[i] = r.second[i];
  NTT(A, len, 1);
  NTT(B, len, 1);
  for (int i = 0; i < len; ++i) A[i] = (long long)A[i] * B[i] % mod;
  NTT(A, len, -1);
  res.first.resize(Len + 1);
  for (int i = 0; i <= Len; ++i) {
    res.first[i] = A[i];
    if (i < r.first.size()) (res.first[i] += r.first[i]) %= mod;
  }
  len = 1;
  Len = l.second.size() + r.second.size() - 2;
  while (len <= Len) len <<= 1;
  for (int i = 0; i < len; ++i) A[i] = B[i] = 0;
  for (int i = 0; i < l.second.size(); ++i) A[i] = l.second[i];
  for (int i = 0; i < r.second.size(); ++i) B[i] = r.second[i];
  NTT(A, len, 1);
  NTT(B, len, 1);
  for (int i = 0; i < len; ++i) A[i] = (long long)A[i] * B[i] % mod;
  NTT(A, len, -1);
  res.second.resize(Len + 1);
  for (int i = 0; i <= Len; ++i) {
    res.second[i] = A[i];
  }
  return res;
}
void dfs(int x, int f) {
  if (find(G[x].begin(), G[x].end(), f) != G[x].end())
    G[x].erase(find(G[x].begin(), G[x].end(), f));
  size[x] = 1;
  if (G[x].size() == 0) {
    poly[x].push_back({0, 1});
    return;
  }
  for (int u : G[x]) {
    dfs(u, x);
    size[x] += size[u];
  }
  if (G[x].size() == 1) {
    int u = G[x][0];
    swap(poly[u], poly[x]);
    poly[x].push_back({0, 1});
  } else {
    int l = G[x][0];
    int r = G[x][1];
    if (size[r] < size[l]) swap(l, r);
    vector<int> P = value(poly[l]).first, Q;
    Q.push_back(0);
    for (int i : P) Q.push_back(i);
    swap(poly[x], poly[r]);
    poly[x].push_back(Q);
  }
}
int main() {
  cin >> n >> x;
  for (int i = 1; i < n; ++i) {
    int x, y;
    scanf("%d %d", &x, &y);
    G[x].push_back(y);
    G[y].push_back(x);
  }
  dfs(1, 0);
  C[0] = 1;
  for (int i = 1; i <= n; ++i) {
    C[i] = (x + i) % mod * C[i - 1] % mod * Pow(i, mod - 2, mod) % mod;
  }
  vector<int> P = value(poly[1]).first;
  for (int i = 1; i < P.size(); ++i) {
    ans += P[i] * C[i - 1];
    ans %= mod;
  }
  cout << ans;
}

### Prompt

Please provide a Cpp coded solution to the problem described below:

The Main Martian Tree grows on Mars. It is a binary tree (a rooted tree, with no more than two sons at each vertex) with n vertices, where the root vertex has the number 1. Its fruits are the Main Martian Fruits. It's summer now, so this tree does not have any fruit yet.

Autumn is coming soon, and leaves and branches will begin to fall off the tree. It is clear, that if a vertex falls off the tree, then its entire subtree will fall off too. In addition, the root will remain on the tree. Formally: the tree will have some connected subset of vertices containing the root.

After that, the fruits will grow on the tree (only at those vertices which remain). Exactly x fruits will grow in the root. The number of fruits in each remaining vertex will be not less than the sum of the numbers of fruits in the remaining sons of this vertex. It is allowed, that some vertices will not have any fruits.

Natasha wondered how many tree configurations can be after the described changes. Since this number can be very large, output it modulo 998244353.

Two configurations of the resulting tree are considered different if one of these two conditions is true:

  * they have different subsets of remaining vertices;
  * they have the same subset of remaining vertices, but there is a vertex in this subset where they have a different amount of fruits.

Input

The first line contains two integers: n and x (1 ≤ n ≤ 10^5, 0 ≤ x ≤ 10^{18}) — the size of the tree and the number of fruits in the root.

The i-th of the following (n-1) lines contains two integers a_i and b_i (1 ≤ a_i, b_i ≤ n) — vertices connected by the i-th edge of the tree.

It is guaranteed that the input data describes a correct binary tree with the root at the vertex 1.

Output

Print one number — the number of configurations of the resulting tree modulo 998244353.

Examples

Input

3 2
1 2
1 3


Output

13


Input

2 5
1 2


Output

7


Input

4 10
1 2
1 3
3 4


Output

441

Note

Consider the first example. <image>

There are 2 fruits at the vertex 1. The following 13 options are possible:

  * there is no vertex 2, there is no vertex 3; <image>
  * there is no vertex 2, there are no fruits at the vertex 3; <image>
  * there is no vertex 2, there is 1 fruit at the vertex 3; <image>
  * there is no vertex 2, there are 2 fruits at the vertex 3; <image>
  * there are no fruits at the vertex 2, there is no vertex 3; <image>
  * there are no fruits at the vertex 2, there are no fruits at the vertex 3; <image>
  * there are no fruits at the vertex 2, there is 1 fruit at the vertex 3; <image>
  * there are no fruits at the vertex 2, there are 2 fruits at the vertex 3; <image>
  * there is 1 fruit at the vertex 2, there is no vertex 3; <image>
  * there is 1 fruit at the vertex 2, there are no fruits at the vertex 3; <image>
  * there is 1 fruit at the vertex 2, there is 1 fruit at the vertex 3; <image>
  * there are 2 fruits at the vertex 2, there is no vertex 3; <image>
  * there are 2 fruits at the vertex 2, there are no fruits at the vertex 3. <image>



Consider the second example. There are 5 fruits at the vertex 1. The following 7 options are possible:

  * there is no vertex 2;
  * there are no fruits at the vertex 2;
  * there is 1 fruit at the vertex 2;
  * there are 2 fruits at the vertex 2;
  * there are 3 fruits at the vertex 2;
  * there are 4 fruits at the vertex 2;
  * there are 5 fruits at the vertex 2.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5;
const int mod = 998244353;
const int g = 3;
int Pow(long long a, int x, const int &mod) {
  long long res = 1;
  while (x) {
    if (x & 1) (res *= a) %= mod;
    (a *= a) %= mod;
    x >>= 1;
  }
  return res;
}
void NTT(int *a, int n, int rev) {
  for (int i = 0, j = 0; i < n; ++i) {
    if (i > j) swap(a[i], a[j]);
    for (int k = n >> 1; (j ^= k) < k; k >>= 1)
      ;
  }
  for (int i = 2; i <= n; i <<= 1) {
    int m = i >> 1;
    int w = Pow(g, (mod - 1) / i, mod);
    if (rev == -1) w = Pow(w, mod - 2, mod);
    for (int j = 0; j < n; j += i) {
      long long Wx = 1;
      for (int k = 0; k != m; k++) {
        long long z = a[j + m + k] * Wx % mod;
        a[j + m + k] = a[j + k] - z + mod;
        if (a[j + m + k] >= mod) a[j + m + k] -= mod;
        a[j + k] = a[j + k] + z;
        if (a[j + k] >= mod) a[j + k] -= mod;
        Wx = Wx * w % mod;
      }
    }
  }
  if (rev == -1) {
    long long inv = Pow(n, mod - 2, mod);
    for (int i = 0; i < n; i++) a[i] = a[i] * inv % mod;
  }
}
int len, Len, A[N], B[N];
long long ans, x, C[N];
int n, size[N];
vector<int> G[N];
vector<vector<int>> poly[N];
pair<vector<int>, vector<int>> value(vector<vector<int>> &poly) {
  pair<vector<int>, vector<int>> res;
  if (poly.size() == 1) {
    res = make_pair(poly[0], poly[0]);
    res.first[0]++;
    return res;
  }
  int mid = poly.size() >> 1;
  vector<vector<int>> L, R;
  for (int i = 0; i < mid; ++i) L.push_back(poly[i]);
  for (int i = mid; i < poly.size(); ++i) R.push_back(poly[i]);
  pair<vector<int>, vector<int>> l, r;
  l = value(L);
  r = value(R);
  len = 1;
  Len = l.first.size() + r.second.size() - 2;
  while (len <= Len) len <<= 1;
  for (int i = 0; i < len; ++i) A[i] = B[i] = 0;
  (l.first[0] += mod - 1) %= mod;
  for (int i = 0; i < l.first.size(); ++i) A[i] = l.first[i];
  for (int i = 0; i < r.second.size(); ++i) B[i] = r.second[i];
  NTT(A, len, 1);
  NTT(B, len, 1);
  for (int i = 0; i < len; ++i) A[i] = (long long)A[i] * B[i] % mod;
  NTT(A, len, -1);
  res.first.resize(Len + 1);
  for (int i = 0; i <= Len; ++i) {
    res.first[i] = A[i];
    if (i < r.first.size()) (res.first[i] += r.first[i]) %= mod;
  }
  len = 1;
  Len = l.second.size() + r.second.size() - 2;
  while (len <= Len) len <<= 1;
  for (int i = 0; i < len; ++i) A[i] = B[i] = 0;
  for (int i = 0; i < l.second.size(); ++i) A[i] = l.second[i];
  for (int i = 0; i < r.second.size(); ++i) B[i] = r.second[i];
  NTT(A, len, 1);
  NTT(B, len, 1);
  for (int i = 0; i < len; ++i) A[i] = (long long)A[i] * B[i] % mod;
  NTT(A, len, -1);
  res.second.resize(Len + 1);
  for (int i = 0; i <= Len; ++i) {
    res.second[i] = A[i];
  }
  return res;
}
void dfs(int x, int f) {
  if (find(G[x].begin(), G[x].end(), f) != G[x].end())
    G[x].erase(find(G[x].begin(), G[x].end(), f));
  size[x] = 1;
  if (G[x].size() == 0) {
    poly[x].push_back({0, 1});
    return;
  }
  for (int u : G[x]) {
    dfs(u, x);
    size[x] += size[u];
  }
  if (G[x].size() == 1) {
    int u = G[x][0];
    swap(poly[u], poly[x]);
    poly[x].push_back({0, 1});
  } else {
    int l = G[x][0];
    int r = G[x][1];
    if (size[r] < size[l]) swap(l, r);
    vector<int> P = value(poly[l]).first, Q;
    Q.push_back(0);
    for (int i : P) Q.push_back(i);
    swap(poly[x], poly[r]);
    poly[x].push_back(Q);
  }
}
int main() {
  cin >> n >> x;
  for (int i = 1; i < n; ++i) {
    int x, y;
    scanf("%d %d", &x, &y);
    G[x].push_back(y);
    G[y].push_back(x);
  }
  dfs(1, 0);
  C[0] = 1;
  for (int i = 1; i <= n; ++i) {
    C[i] = (x + i) % mod * C[i - 1] % mod * Pow(i, mod - 2, mod) % mod;
  }
  vector<int> P = value(poly[1]).first;
  for (int i = 1; i < P.size(); ++i) {
    ans += P[i] * C[i - 1];
    ans %= mod;
  }
  cout << ans;
}

```