Problem: All bus tickets in Berland have their numbers. A number consists of n digits (n is even). Only k decimal digits d_1, d_2, ..., d_k can be used to form ticket numbers. If 0 is among these digits, then numbers may have leading zeroes. For example, if n = 4 and only digits 0 and 4 can be used, then 0000, 4004, 4440 are valid ticket numbers, and 0002, 00, 44443 are not.

A ticket is lucky if the sum of first n / 2 digits is equal to the sum of remaining n / 2 digits. 

Calculate the number of different lucky tickets in Berland. Since the answer may be big, print it modulo 998244353.

Input

The first line contains two integers n and k (2 ≤ n ≤ 2 ⋅ 10^5, 1 ≤ k ≤ 10) — the number of digits in each ticket number, and the number of different decimal digits that may be used. n is even.

The second line contains a sequence of pairwise distinct integers d_1, d_2, ..., d_k (0 ≤ d_i ≤ 9) — the digits that may be used in ticket numbers. The digits are given in arbitrary order.

Output

Print the number of lucky ticket numbers, taken modulo 998244353.

Examples

Input

4 2
1 8


Output

6


Input

20 1
6


Output

1


Input

10 5
6 1 4 0 3


Output

569725


Input

1000 7
5 4 0 1 8 3 2


Output

460571165

Note

In the first example there are 6 lucky ticket numbers: 1111, 1818, 1881, 8118, 8181 and 8888.

There is only one ticket number in the second example, it consists of 20 digits 6. This ticket number is lucky, so the answer is 1.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const static int P = 998244353;
const static int MAX = 1 << 20;
struct Mod {
  Mod() {}
  Mod(int val) { _val = val % P; }
  Mod(long long val) { _val = (int)(val % (long long)P); }
  int val() const { return _val; }
  Mod operator+(Mod rhs) {
    int temp = this->val() + rhs.val();
    temp %= P;
    return Mod(temp);
  }
  Mod operator-(Mod rhs) {
    int temp = this->val() - rhs.val() + P;
    temp %= P;
    return Mod(temp);
  }
  Mod operator*(Mod rhs) {
    long long temp =
        ((long long)(this->val()) * (long long)(rhs.val())) % (long long)P;
    return Mod(temp);
  }
  Mod operator/(Mod rhs) { return (*this) * inverse(rhs); }
  bool operator==(Mod rhs) { return *this == rhs.val(); }
  bool operator==(int rhs) { return (this->val() == rhs) ? true : false; }
  static Mod power(Mod arg, int pow) {
    if (pow == 1) {
      return arg;
    }
    if (pow % 2) {
      Mod temp = power(arg, pow / 2);
      return temp * temp * arg;
    } else {
      Mod temp = power(arg, pow / 2);
      return temp * temp;
    }
  }

 private:
  Mod inverse(Mod arg) {
    assert(arg.val() != 0);
    return power(arg, P - 2);
  }
  int _val;
};
const static Mod G(3);
void make_rev(int *rev, int n) {
  int len = 0;
  for (int m = n; !(m & 1); m >>= 1) len++;
  rev[0] = 0;
  for (int i = 1; i < n; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (len - 1));
}
void NTT(Mod *p, int n, bool is_inverse = false) {
  int rev[MAX];
  make_rev(rev, n);
  for (int i = 0; i < n; i++)
    if (i < rev[i]) std::swap(p[i], p[rev[i]]);
  for (int j = 1; j < n; j <<= 1) {
    Mod wn1, w, t0, t1;
    wn1 = Mod::power(G, (P - 1) / (j << 1));
    if (is_inverse) wn1 = Mod::power(wn1, P - 2);
    for (int i = 0; i < n; i += j << 1) {
      w = Mod(1);
      for (int k = 0; k < j; k++) {
        t0 = p[i + k];
        t1 = w * p[i + j + k];
        p[i + k] = t0 + t1;
        p[i + j + k] = t0 - t1;
        w = w * wn1;
      }
    }
  }
  if (is_inverse) {
    for (int i = 0; i < n; i++) p[i] = p[i] / Mod(n);
  }
}
void times2(Mod *from, Mod *to, int flen) {
  int n;
  for (n = 1; n < 2 * flen - 1; n <<= 1) {
  }
  for (int i = flen; i < n; i++) {
    from[i] = Mod(0);
  }
  NTT(from, n);
  for (int i = 0; i < n; i++) {
    to[i] = from[i] * from[i];
  }
  NTT(to, n, true);
}
void next(const Mod *from, Mod *to, int flen, int *used, int k) {
  for (int i = 0; i < flen + 9; i++) {
    to[i] = Mod(0);
  }
  for (int i = 0; i < flen; i++) {
    for (int j = 0; j < k; j++) {
      int idx = i + used[j];
      to[idx] = to[idx] + from[i];
    }
  }
}
int plan(const int m, bool *route) {
  std::stack<bool> s;
  int n = m;
  while (n) {
    s.push(n & 1);
    n >>= 1;
  }
  int len = 0;
  while (!s.empty()) {
    route[len++] = s.top();
    s.pop();
  }
  return len;
}
int prob() {
  int n, m, k;
  cin >> n >> k;
  m = n / 2;
  int d[10];
  int dmax = -1;
  for (int i = 0; i < k; i++) {
    cin >> d[i];
    if (dmax < d[i]) {
      dmax = d[i];
    }
  }
  if (k == 1) {
    cout << 1;
    return 1;
  }
  bool route[20];
  int route_len = plan(m, route);
  int x = 1;
  static Mod p[MAX];
  static Mod q[MAX];
  int valid = 10;
  for (int s = 0; s <= valid; s++) {
    p[s] = Mod(0);
  }
  for (int i = 0; i < k; i++) {
    p[d[i]] = Mod(1);
  }
  Mod *from;
  Mod *to;
  int step = 0;
  while (true) {
    step++;
    if (step == route_len) break;
    x++;
    if (x % 2) {
      from = q;
      to = p;
    } else {
      from = p;
      to = q;
    }
    times2(from, to, valid);
    valid = 2 * valid - 1;
    if (route[step]) {
      x++;
      if (x % 2) {
        from = q;
        to = p;
      } else {
        from = p;
        to = q;
      }
      next(from, to, valid, d, k);
      valid += 9;
    }
  }
  assert(valid == 9 * m + 1);
  Mod count(0);
  Mod *head;
  if (x % 2) {
    head = p;
  } else {
    head = q;
  }
  for (int s = 0; s <= m * dmax; s++) {
    count = count + head[s] * head[s];
  }
  int ans = count.val();
  cout << ans << endl;
  return ans;
}
void test() {
  {
    assert(Mod(P - 1) + Mod(P - 1) == P - 2);
    assert(Mod(1) - Mod(2) == P - 1);
    assert(Mod(0) - Mod(P - 1) == 1);
    assert(Mod(P - 1) * Mod(P - 1) == 1);
    assert(Mod(1) + Mod(P - 1) * Mod(P - 1) == 2);
    assert(Mod(P - 1) * Mod(P - 1) * Mod(P - 1) == P - 1);
    assert(Mod(1) / Mod(P - 1) == P - 1);
    assert(Mod(7) / Mod(8) == 124780545);
    assert(Mod(1) / Mod(2) + Mod(1) / Mod(3) == Mod(5) / Mod(6));
    assert(Mod(1) / Mod(2) - Mod(1) / Mod(3) == Mod(1) / Mod(6));
    assert((Mod(1) / Mod(2)) / Mod(3) == Mod(1) / Mod(6));
  }
  {
    int n = 16;
    int r[16];
    make_rev(r, n);
    int expected[16] = {0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15};
    for (int i = 0; i < n; i++) {
      assert(r[i] == expected[i]);
    }
  }
  {
    int n = 16;
    Mod p[16];
    for (int i = 0; i < n; i++) {
      p[i] = Mod(i);
    }
    NTT(p, n);
    int expected[16] = {120,       16886715,  790357655, 115058691,
                        692669736, 306777988, 403262520, 432660095,
                        998244345, 565584242, 594981817, 691466349,
                        305574601, 883185646, 207886682, 981357622};
    for (int i = 0; i < n; i++) {
      assert(p[i] == expected[i]);
    }
  }
  {
    int n = 20;
    Mod from[100], to[100];
    for (int i = 0; i < n; i++) {
      from[i] = Mod(1);
    }
    times2(from, to, n);
    for (int i = 0; i < 64; i++) {
      if (i < 2 * n - 1)
        assert(!(to[i] == 0));
      else
        assert(to[i] == 0);
    }
  }
  {
    int n = 5;
    static Mod from[MAX], from_copy[MAX], to[MAX];
    for (int i = 0; i < n; i++) {
      from[i] = Mod(P - 1);
      from_copy[i] = from[i];
    }
    times2(from, to, n);
    for (int j = 0; j < 2 * n - 1; j++) {
      Mod conv(0);
      for (int i = 0; i <= j; i++) {
        conv = conv + from_copy[i] * from_copy[j - i];
      }
      assert(to[j] == conv);
    }
  }
  {
    int n = 5;
    Mod from[100], to[100];
    int used[] = {4, 0, 2, 7}, k = 4;
    ;
    for (int i = 0; i < n; i++) {
      from[i] = Mod(1);
    }
    next(from, to, n, used, k);
    int expected[] = {1, 1, 2, 2, 3, 2, 2, 2, 2, 1, 1, 1, 0, 0};
    for (int j = 0; j < n + 9; j++) {
      assert(to[j].val() == expected[j]);
    }
  }
  {
    int m = 10;
    bool route[20];
    bool expected[] = {1, 0, 1, 0};
    int len = plan(m, route);
    assert(len == 4);
    for (int i = 0; i < len; i++) {
      assert(route[i] == expected[i]);
    }
  }
  {
    int m = 89;
    bool route[20];
    bool expected[] = {1, 0, 1, 1, 0, 0, 1};
    int len = plan(m, route);
    assert(len == 7);
    for (int i = 0; i < len; i++) {
      assert(route[i] == expected[i]);
    }
  }
  {
    int m = 100010;
    bool route[20];
    int len = plan(m, route);
    assert(len == 17);
  }
  {
    freopen("input.txt", "r", stdin);
    int T;
    cin >> T;
    for (int tc = 1; tc <= T; tc++) {
      cout << "test " << tc << endl;
      int ans = prob();
      int expected;
      cin >> expected;
      assert(ans == expected);
    }
  }
}
int main() {
  prob();
  return 0;
}