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;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
const int MOD = 998244353;
const int PRIMROOT = 3;
int pw(int x, int n) {
  int ret = 1;
  while (true) {
    if (n & 1) ret = (long long)ret * x % MOD;
    if ((n >>= 1) == 0) return ret;
    x = (long long)x * x % MOD;
  }
}
struct NTT {
  void _init(int n, int &nlog, int &g, vector<int> &w) {
    assert((MOD - 1) % n == 0);
    g = pw(PRIMROOT, (MOD - 1) / n);
    nlog = 0;
    while ((1 << nlog) < n) ++nlog;
    if ((1 << nlog) != n) nlog = -1;
    w = vector<int>(n);
    w[0] = 1;
    for (int i = (1); i < (n); ++i) w[i] = (long long)w[i - 1] * g % MOD;
  }
  int fftn, fftnlog;
  int fftg;
  vector<int> fftw;
  void initfft(int n) {
    fftn = n, _init(fftn, fftnlog, fftg, fftw);
    assert(fftnlog != -1);
  }
  void fft(int *a, int n, bool inv) {
    if (n != fftn) initfft(n);
    for (int i = 1, j = n >> 1, k, l = j; i < n; j ^= k, ++i) {
      if (i < j) swap(a[i], a[j]);
      for (k = l; k & j; j ^= k, k >>= 1)
        ;
    }
    int *l, *r, *w;
    if (inv) reverse(fftw.begin() + 1, fftw.end());
    for (int hlen = 1, step = n >> 1; hlen < n; hlen <<= 1, step >>= 1) {
      for (int i = 0; i < n; i += (hlen << 1)) {
        l = a + i, r = l + hlen, w = fftw.data();
        for (int off = (0); off < (hlen); ++off) {
          int v = (long long)(*r) * (*w) % MOD;
          *r = (*l) - v;
          if (*r < 0) *r += MOD;
          *l = (*l) + v;
          if (*l >= MOD) *l -= MOD;
          ++l, ++r, w += step;
        }
      }
    }
    if (inv) reverse(fftw.begin() + 1, fftw.end());
    if (inv) {
      int mlt = pw(n, MOD - 2);
      for (int i = (0); i < (n); ++i) a[i] = (long long)a[i] * mlt % MOD;
    }
  }
  void mult(const int *a, int na, const int *b, int nb, int *c, int nc) {
    int sz = 1;
    while (sz < na + nb - 1) sz *= 2;
    vector<int> A(sz, 0), B(sz, 0);
    for (int i = (0); i < (na); ++i) A[i] = a[i];
    for (int i = (0); i < (nb); ++i) B[i] = b[i];
    fft(A.data(), sz, false);
    fft(B.data(), sz, false);
    for (int i = (0); i < (sz); ++i) A[i] = (long long)A[i] * B[i] % MOD;
    fft(A.data(), sz, true);
    for (int i = (0); i < (nc); ++i) c[i] = i < sz ? A[i] : 0;
  }
};
NTT ntt;
void inc(int &a, int b) {
  if ((a += b) >= MOD) a -= MOD;
}
vector<int> add(const vector<int> &a, const vector<int> &b) {
  vector<int> c(max(((int)(a).size()), ((int)(b).size())), 0);
  for (int i = (0); i < (((int)(c).size())); ++i) {
    if (i < ((int)(a).size())) inc(c[i], a[i]);
    if (i < ((int)(b).size())) inc(c[i], b[i]);
  }
  return c;
}
vector<int> mult(const vector<int> &a, const vector<int> &b) {
  vector<int> c(((int)(a).size()) + ((int)(b).size()) - 1, 0);
  ntt.mult(a.data(), ((int)(a).size()), b.data(), ((int)(b).size()), c.data(),
           ((int)(c).size()));
  return c;
}
struct LHeapNode {
  long long val;
  int c[2], dst;
  LHeapNode() { c[0] = c[1] = -1, dst = 0; }
};
struct LHeap {
  int n;
  vector<LHeapNode> nodes;
  void init(int _n) {
    n = _n;
    nodes = vector<LHeapNode>(n);
  }
  void update(int x) {
    if (nodes[x].c[0] == -1 ||
        nodes[x].c[1] != -1 &&
            nodes[nodes[x].c[0]].dst < nodes[nodes[x].c[1]].dst)
      swap(nodes[x].c[0], nodes[x].c[1]);
    nodes[x].dst = nodes[x].c[1] == -1 ? 0 : nodes[nodes[x].c[1]].dst + 1;
  }
  int merge(int x, int y) {
    if (x == -1)
      return y;
    else if (y == -1)
      return x;
    if (nodes[x].val > nodes[y].val) swap(x, y);
    nodes[x].c[1] = merge(nodes[x].c[1], y);
    update(x);
    return x;
  }
  int removemin(int x) { return merge(nodes[x].c[0], nodes[x].c[1]); }
};
struct HuTucker {
  int n;
  vector<int> x;
  vector<int> d;
  void init(vector<int> _x) { n = ((int)(_x).size()), x = _x; }
  LHeap globheap;
  int globroot;
  vector<int> globmp;
  LHeap locheap;
  int atloc;
  vector<int> locmp;
  vector<bool> localive;
  vector<int> locroot, loclft, locrgt;
  vector<pair<int, int>> par;
  void calc() {
    globheap.init(n - 1);
    globroot = -1;
    globmp = vector<int>(n - 1, -1);
    locheap.init(3 * n - 1);
    atloc = 2 * n;
    locmp = vector<int>(3 * n - 1, -1);
    localive = vector<bool>(3 * n - 1, false);
    locroot = vector<int>(2 * n, -1);
    loclft = locrgt = vector<int>(3 * n - 1, -1);
    par = vector<pair<int, int>>();
    for (int i = (0); i < (n); ++i)
      locheap.nodes[2 * i + 0].val = locheap.nodes[2 * i + 1].val =
          (long long)x[i] * n + i;
    for (int i = (0); i < (n - 1); ++i) {
      int l = 2 * i + 1, r = 2 * (i + 1) + 0, x = locheap.merge(l, r);
      localive[l] = localive[r] = true;
      updateloc(x, l, r, i);
    }
    while (globroot != -1) {
      int g = globroot, x = globmp[g];
      long long sum = globheap.nodes[g].val;
      globroot = globheap.removemin(globroot);
      if (x == -1) continue;
      int xl, xr;
      clearloc(x, xl, xr);
      int a = x;
      x = locheap.removemin(x);
      int b = x;
      x = locheap.removemin(x);
      process(a, x, xl, xr);
      process(b, x, xl, xr);
      int y = atloc++;
      localive[y] = true;
      locheap.nodes[y].val = sum;
      x = locheap.merge(x, y);
      updateloc(x, xl, xr, g);
      par.push_back(make_pair(a < 2 * n ? a / 2 : a - n, y - n));
      par.push_back(make_pair(b < 2 * n ? b / 2 : b - n, y - n));
    }
    vector<int> dep(2 * n - 1, 0);
    for (int i = ((int)(par).size()) - 1; i >= 0; --i)
      dep[par[i].first] = dep[par[i].second] + 1;
    d = vector<int>(n);
    for (int i = (0); i < (n); ++i) d[i] = dep[i];
  }
  void updateloc(int x, int l, int r, int g) {
    while (x != -1 && !localive[x]) x = locheap.removemin(x);
    if (x == -1) return;
    for (int i = (0); i < (2); ++i)
      while (true) {
        int y = locheap.nodes[x].c[i];
        if (y == -1 || localive[y]) break;
        locheap.nodes[x].c[i] = locheap.removemin(y);
      }
    locheap.update(x);
    loclft[x] = l, locrgt[x] = r;
    if (l != -1) locroot[l] = x;
    if (r != -1) locroot[r] = x;
    int y = locheap.nodes[x].c[0], z = locheap.nodes[x].c[1];
    if (y == -1 && z == -1) return;
    long long v1 = locheap.nodes[x].val,
              v2 = locheap
                       .nodes[y != -1 && (z == -1 || locheap.nodes[y].val <
                                                         locheap.nodes[z].val)
                                  ? y
                                  : z]
                       .val,
              sum = (v1 / n + v2 / n) * n + min(v1 % n, v2 % n);
    globmp[g] = x, locmp[x] = g;
    globheap.nodes[g].val = sum;
    globheap.nodes[g].c[0] = globheap.nodes[g].c[1] = -1;
    globheap.nodes[g].dst = 0;
    globroot = globheap.merge(globroot, g);
  }
  void clearloc(int x, int &l, int &r) {
    int g = locmp[x];
    if (g != -1) globmp[g] = -1;
    locmp[x] = -1;
    l = loclft[x], r = locrgt[x];
    loclft[x] = locrgt[x] = -1;
    if (l != -1) locroot[l] = -1;
    if (r != -1) locroot[r] = -1;
  }
  void process(int a, int &x, int &xl, int &xr) {
    localive[a] = false;
    if (a >= 2 * n) return;
    assert(a == xl || a == xr);
    if (a == 1) {
      xl = -1;
      return;
    }
    if (a == 2 * n - 2) {
      xr = -1;
      return;
    }
    int b = a ^ 1, y = locroot[b];
    assert(y != -1 && locmp[y] != -1);
    localive[b] = false;
    int yl, yr;
    clearloc(y, yl, yr);
    x = locheap.merge(x, y);
    if (a == xl) {
      assert(yr == b);
      xl = yl;
    }
    if (a == xr) {
      assert(yl == b);
      xr = yr;
    }
  }
};
HuTucker ht;
const int MAXN = 100000;
int n;
long long want;
vector<int> adj[MAXN];
int par[MAXN];
int sz[MAXN];
int dep[MAXN];
int heavy[MAXN];
vector<int> ways[MAXN];
vector<int> waysnonheavy[MAXN];
void dfsinit(int at) {
  dep[at] = par[at] == -1 ? 0 : dep[par[at]] + 1, sz[at] = 1, heavy[at] = -1;
  for (int i = (0); i < (((int)(adj[at]).size())); ++i) {
    int to = adj[at][i];
    if (to == par[at]) continue;
    par[to] = at;
    dfsinit(to);
    sz[at] += sz[to];
    if (heavy[at] == -1 || sz[to] > sz[heavy[at]]) heavy[at] = to;
  }
}
int path[MAXN], npath;
pair<vector<int>, vector<int>> rec(int l, int r) {
  if (l == r) {
    int at = path[l];
    return make_pair(waysnonheavy[at], waysnonheavy[at]);
  } else {
    int lsum = 0, cl = l - 1, rsum = 0, cr = r + 1;
    while (cr - cl > 1)
      if (lsum <= rsum)
        lsum += ((int)(waysnonheavy[path[++cl]]).size());
      else
        rsum += ((int)(waysnonheavy[path[--cr]]).size());
    auto res1 = rec(l, cl);
    auto res2 = rec(cr, r);
    return make_pair(add(res1.first, mult(res1.second, res2.first)),
                     mult(res1.second, res2.second));
  }
}
int lst[MAXN], nlst;
vector<int> tmp[2 * MAXN];
int ntmp;
priority_queue<pair<int, int>> pq;
void calcways(int at);
void calcwaysnonheavy(int at) {
  for (int i = (0); i < (((int)(adj[at]).size())); ++i) {
    int to = adj[at][i];
    if (to == par[at] || to == heavy[at]) continue;
    calcways(to);
  }
  nlst = 0;
  for (int i = (0); i < (((int)(adj[at]).size())); ++i) {
    int to = adj[at][i];
    if (to == par[at] || to == heavy[at]) continue;
    lst[nlst++] = to;
  }
  ntmp = nlst;
  pq = priority_queue<pair<int, int>>();
  for (int i = (0); i < (nlst); ++i)
    tmp[i] = ways[lst[i]], pq.push(make_pair(-((int)(tmp[i]).size()), i));
  while (((int)(pq).size()) >= 2) {
    int a = pq.top().second;
    pq.pop();
    int b = pq.top().second;
    pq.pop();
    int c = ntmp++;
    tmp[ntmp] = mult(tmp[a], tmp[b]),
    pq.push(make_pair(-((int)(tmp[c]).size()), c));
  }
  waysnonheavy[at] =
      ((int)(pq).size()) == 1 ? tmp[pq.top().second] : vector<int>(1, 1);
  waysnonheavy[at].insert(waysnonheavy[at].begin(), 0);
  for (int i = (0); i < (ntmp); ++i) tmp[i].clear();
}
void calcways(int at) {
  for (int x = at; x != -1; x = heavy[x]) calcwaysnonheavy(x);
  npath = 0;
  for (int x = at; x != -1; x = heavy[x]) path[npath++] = x;
  vector<int> x(npath);
  for (int i = (0); i < (npath); ++i) x[i] = ((int)(waysnonheavy[i]).size());
  ht.init(x);
  ht.calc();
  vector<int> d = ht.d;
  vector<pair<int, pair<vector<int>, vector<int>>>> stck;
  for (int i = (0); i < (npath); ++i) {
    auto cur = make_pair(
        d[i], make_pair(waysnonheavy[path[i]], waysnonheavy[path[i]]));
    while (((int)(stck).size()) > 0 && stck.back().first == cur.first) {
      cur = make_pair(
          cur.first - 1,
          make_pair(add(stck.back().second.first,
                        mult(stck.back().second.second, cur.second.first)),
                    mult(stck.back().second.second, cur.second.second)));
      stck.pop_back();
    }
    stck.push_back(cur);
  }
  assert(((int)(stck).size()) == 1 && stck[0].first == 0);
  ways[at] = stck[0].second.first;
  inc(ways[at][0], 1);
}
int inv[MAXN + 1];
void run() {
  scanf("%d%lld", &n, &want);
  for (int i = (0); i < (n - 1); ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    --a, --b;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  par[0] = -1;
  dfsinit(0);
  calcways(0);
  int ret = 0, mlt = 1;
  inv[1] = 1;
  for (int i = (2); i < (((int)(ways[0]).size())); ++i)
    inv[i] = (long long)(MOD - MOD / i) * inv[MOD % i] % MOD;
  for (int i = (1); i < (((int)(ways[0]).size())); ++i) {
    ret = (ret + (long long)ways[0][i] * mlt) % MOD;
    mlt = (long long)mlt * (want % MOD + i) % MOD * inv[i] % MOD;
  }
  printf("%d\n", ret);
}
int main() {
  run();
  return 0;
}