Problem: 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.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <class T>
using vv = vector<vector<T>>;
template <class T>
inline bool MX(T &l, const T &r) {
  return l < r ? l = r, 1 : 0;
}
template <class T>
inline bool MN(T &l, const T &r) {
  return l > r ? l = r, 1 : 0;
}
const ll MOD = 998244353;
ll modpow(ll r, ll n, ll m = MOD) {
  ll re = 1, d = r % m;
  if (n < 0) (n %= m - 1) += m - 1;
  for (; n; n /= 2) {
    if (n & 1) (re *= d) %= m;
    (d *= d) %= m;
  }
  return re;
}
template <int mod = MOD>
struct modInt {
  int v;
  modInt(int v = 0) : v(v) {}
  modInt(ll v) : v(v % MOD) {}
  modInt operator+(const modInt &n) const {
    return v + n.v < mod ? v + n.v : v + n.v - mod;
  }
  modInt operator-(const modInt &n) const {
    return v - n.v < 0 ? v - n.v + mod : v - n.v;
  }
  modInt operator*(const modInt &n) const { return ll(v) * n.v % mod; }
  modInt operator/(const modInt &n) const {
    return ll(v) * modpow(n.v % mod, -1, mod) % mod;
  }
  modInt operator+(const ll &n) const {
    return v + n < mod ? v + n : v + n - mod;
  }
  modInt operator-(const ll &n) const {
    return v - n < 0 ? v - n + mod : v - n;
  }
  modInt operator*(const ll &n) const { return ll(v) * (n % mod) % mod; }
  modInt operator/(const ll &n) const {
    return ll(v) * modpow(n % mod, -1, mod) % mod;
  }
  modInt &operator+=(const modInt &n) {
    v += n.v;
    if (v >= mod) v -= mod;
    return *this;
  }
  modInt &operator-=(const modInt &n) {
    v -= n.v;
    if (v < 0) v += mod;
    return *this;
  }
  modInt &operator*=(const modInt &n) {
    v = ll(v) * n.v % mod;
    return *this;
  }
  modInt &operator/=(const modInt &n) {
    v = ll(v) * modpow(n.v, -1, mod) % mod;
    return *this;
  }
  modInt &operator+=(const ll &n) {
    v += n;
    if (v >= mod) v -= mod;
    return *this;
  }
  modInt &operator-=(const ll &n) {
    v -= n;
    if (v < 0) v += mod;
    return *this;
  }
  modInt &operator*=(const ll &n) {
    v = ll(v) * n % mod;
    return *this;
  }
  modInt &operator/=(const ll &n) {
    v = ll(v) * modpow(n, -1, mod) % mod;
    return *this;
  }
};
template <int mod>
ostream &operator<<(ostream &os, const modInt<mod> &n) {
  return os << n.v;
};
template <int mod>
modInt<mod> operator+(const ll &n, const modInt<mod> &m) {
  return m.v + n < mod ? m.v + n : m.v + n - mod;
}
template <int mod>
modInt<mod> operator-(const ll &n, const modInt<mod> &m) {
  return n - m.v < 0 ? n - m.v + mod : n - m.v;
}
template <int mod>
modInt<mod> operator*(const ll &n, const modInt<mod> &m) {
  return ll(m.v) * (n % mod) % mod;
}
template <int mod>
modInt<mod> operator/(const ll &n, const modInt<mod> &m) {
  return modInt<mod>(n % mod) / m;
}
template <int mod>
modInt<mod> modpow(modInt<mod> r, ll n) {
  modInt<mod> re(1);
  if (n < 0) (n %= mod - 1) += mod - 1;
  for (; n; n /= 2) {
    if (n & 1) re *= r;
    r *= r;
  }
  return re;
}
vector<modInt<MOD>> fact, finv, inv;
modInt<MOD> comb(ll n, ll r) {
  if (n < r || r < 0) return 0;
  return fact[n] * finv[n - r] * finv[r];
}
class Doralion {
  void Modinvs(vector<modInt<MOD>> &re, int n) {
    re.resize(n + 1);
    re[1] = 1;
    for (int i = 2; i <= n; ++i) re[i] = re[MOD % i] * (MOD - MOD / i);
  }
  void Facts(vector<modInt<MOD>> &re, int n) {
    re.resize(n + 1);
    re[0] = 1;
    for (int(i) = 0; (i) < (n); ++(i)) re[i + 1] = re[i] * (i + 1);
  }
  void Factinvs(vector<modInt<MOD>> &re, const vector<modInt<MOD>> &inv,
                int n) {
    re.resize(n + 1);
    re[0] = 1;
    for (int(i) = 0; (i) < (n); ++(i)) re[i + 1] = re[i] * inv[i + 1];
  }

 public:
  Doralion(int n) {
    Modinvs(inv, n);
    Facts(fact, n);
    Factinvs(finv, inv, n);
  }
} doralion(1123456);
template <int B, int ROOT = 5>
struct FMT {
  modInt<MOD> R[2 * (B + 1)];
  vector<int> m2[(B + 1)];
  vector<modInt<MOD>> power[2 * (B + 1)];
  FMT() {
    for (int(e) = 0; (e) < ((B + 1)); ++(e)) {
      m2[e].resize(1 << e);
      for (int(m) = 0; (m) < (1 << e); ++(m))
        for (int(i) = 0; (i) < (e); ++(i))
          if (m & (1 << i)) m2[e][m] |= (1 << (e - 1 - i));
      modInt<MOD> w1 = modpow(ROOT, (MOD - 1) / (2 << e));
      modInt<MOD> w2 = modpow(w1, -1);
      power[e].resize(1 << e);
      power[(B + 1) + e].resize(1 << e);
      power[e][0] = power[(B + 1) + e][0] = 1;
      for (int(j) = 1; (j) < ((1 << e)); ++(j)) {
        power[e][j] = power[e][j - 1] * w1;
        power[(B + 1) + e][j] = power[(B + 1) + e][j - 1] * w2;
      }
    }
  }
  void transform(modInt<MOD> *f, int N, bool inv) {
    int e;
    for (e = 0;; e++)
      if (N == (1 << e)) break;
    for (int(m) = 0; (m) < (N); ++(m))
      if (m < m2[e][m]) swap(f[m], f[m2[e][m]]);
    for (int t = 0, t2 = 1; t2 < N; t++, t2 += t2) {
      modInt<MOD> *po = power[inv * (B + 1) + t].data();
      for (int i = 0; i < N; i += t2 + t2) {
        for (int j = 0; j < (1 << t); j++) {
          modInt<MOD> x = f[i + j];
          modInt<MOD> y = f[i + t2 + j] * po[j];
          f[i + j] = x + y;
          f[i + t2 + j] = x - y;
        }
      }
    }
    if (inv) {
      modInt<MOD> ni = modpow(N, -1);
      for (int i = 0; i < N; i++) f[i] = f[i] * ni;
    }
  }
  template <typename T>
  vector<modInt<MOD>> convolution(const vector<T> &f, const vector<T> &g) {
    const int n = f.size(), m = g.size();
    int n2 = 1;
    while (n2 < f.size() + g.size()) n2 *= 2;
    vector<modInt<MOD>> cf(n2), cg(n2);
    for (int(i) = 0; (i) < (n); ++(i)) cf[i] = f[i];
    for (int(i) = 0; (i) < (m); ++(i)) cg[i] = g[i];
    transform(cf.data(), n2, false);
    transform(cg.data(), n2, false);
    for (int(i) = 0; (i) < (n2); ++(i)) cf[i] *= cg[i];
    transform(cf.data(), n2, true);
    while (cf.size() && cf.back().v == 0) cf.pop_back();
    return cf;
  }
};
FMT<17> fmt;
int n;
vv<int> g;
vector<vv<modInt<MOD>>> dp;
vector<int> sz;
using pff = pair<vector<modInt<MOD>>, vector<modInt<MOD>>>;
pff eval(vv<modInt<MOD>> &fs) {
  int n = fs.size();
  ;
  if (n == 0) return pff({}, {});
  if (n == 1) {
    return pff(fs[0], fs[0]);
  }
  int deg = 0;
  for (auto &f : fs) deg += max(0, (int)f.size() - 1);
  vv<modInt<MOD>> ls, rs;
  {
    int sum = 0;
    for (auto &f : fs) {
      sum += max(0, (int)f.size() - 1);
      (sum * 2 > deg && ls.size() ? rs : ls).push_back(f);
    }
  }
  pff l = eval(ls);
  pff r = eval(rs);
  pff re(fmt.convolution(l.first, r.second),
         fmt.convolution(l.second, r.second));
  if (r.first.size() > re.first.size()) re.first.resize(r.first.size());
  for (int(i) = 0; (i) < (r.first.size()); ++(i)) re.first[i] += r.first[i];
  return re;
}
void dfs(int v, int p) {
  {
    auto it = find((g[v]).begin(), (g[v]).end(), p);
    if (it != g[v].end()) g[v].erase(it);
  }
  sz[v] = 1;
  for (auto w : g[v]) {
    dfs(w, v);
    sz[v] += sz[w];
  }
  if (g[v].size() == 0) {
    dp[v].push_back({0, 1});
  } else if (g[v].size() == 1) {
    swap(dp[v], dp[g[v][0]]);
    dp[v].push_back({0, 1});
  } else {
    int w = g[v][0];
    int w_ = g[v][1];
    if (sz[w] > sz[w_]) swap(w, w_);
    swap(dp[v], dp[w_]);
    auto f = eval(dp[w]).first;
    if (f.empty()) f.emplace_back();
    f[0] += 1;
    ;
    f.insert(f.begin(), 0);
    ;
    dp[v].emplace_back(f);
  }
}
modInt<MOD> solve(vv<int> g, ll x) {
  n = g.size();
  ::g = g;
  dp.resize(n);
  sz.resize(n);
  dfs(0, -1);
  auto re = eval(dp[0]).first;
  if (re.empty()) re.emplace_back();
  re[0] += 1;
  ;
  vector<modInt<MOD>> binom(n + 1);
  x %= MOD;
  binom[1] = 1;
  for (int(i) = 2; (i) < (n + 1); ++(i)) {
    ++x;
    if (x == MOD) x = 0;
    binom[i] = binom[i - 1] * x;
  }
  for (int(i) = 2; (i) < (n + 1); ++(i)) binom[i] *= finv[i - 1];
  modInt<MOD> ans = 0;
  for (int(i) = 1; (i) < (n + 1); ++(i)) ans += binom[i] * re[i];
  ;
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(0);
  ll x;
  cin >> n >> x;
  g.resize(n);
  dp.resize(n);
  sz.resize(n);
  for (int(i) = 0; (i) < (n - 1); ++(i)) {
    int a, b;
    cin >> a >> b;
    --a;
    --b;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  cout << solve(g, x) << endl;
  return 0;
}