#include <bits/stdc++.h>
using namespace std;
const int Maxn = 1000005, mod = 998244353;
bool chk[10];
int mx;
int ksm(int x, int k) {
  int ret = 1, tmp = x;
  while (k) {
    if (k & 1) ret = 1ll * ret * tmp % mod;
    tmp = 1ll * tmp * tmp % mod;
    k >>= 1;
  }
  return ret;
}
int inv(int x) { return ksm(x, mod - 2); }
namespace NTT {
void transform(int n, int* a, int type) {
  int k = ceil(log2(n));
  for (int i = 0; i < n; i++) {
    int t = 0;
    for (int j = 0; j < k; j++)
      if (i & (1 << j)) t |= 1 << (k - j - 1);
    if (t > i) swap(a[t], a[i]);
  }
  for (int l = 2; l <= n; l <<= 1)
    for (int *p = a, base = ksm(3, mod / l); p != a + n; p += l)
      for (int i = 0, m = l >> 1, w = 1; i < m; i++, w = 1ll * w * base % mod) {
        int t = 1ll * p[i + m] * w % mod;
        p[i + m] = (p[i] - t) % mod;
        p[i] = (p[i] + t) % mod;
      }
  if (type == -1) {
    reverse(a + 1, a + n);
    int inv_n = inv(n);
    for (int i = 0; i < n; i++) a[i] = 1ll * a[i] * inv_n % mod;
  }
}
vector<int> mul(vector<int> a, vector<int> b) {
  static int A[4 * Maxn], B[4 * Maxn];
  int n = a.size(), m = b.size();
  int N = 1 << int(ceil(log2(n + m)));
  for (int i = 0; i < N; i++) A[i] = i < n ? a[i] : 0;
  for (int i = 0; i < N; i++) B[i] = i < m ? b[i] : 0;
  transform(N, A, 1);
  transform(N, B, 1);
  for (int i = 0; i < N; i++) A[i] = 1ll * A[i] * B[i] % mod;
  transform(N, A, -1);
  return vector<int>(A, A + n + m - 1);
}
}  // namespace NTT
vector<int> mul(int n) {
  if (n == 1) return vector<int>(chk, chk + mx);
  if (n & 1) return NTT::mul(mul(n - 1), vector<int>(chk, chk + mx));
  vector<int> qaq = mul(n / 2);
  return NTT::mul(qaq, qaq);
}
int main() {
  int n, k, ans = 0;
  cin >> n >> k;
  for (int i = 0; i < k; i++) {
    int x;
    cin >> x;
    chk[x] = true;
    mx = max(mx, x + 1);
  }
  vector<int> qaq = mul(n / 2);
  for (int i : qaq) ans = (ans + 1ll * i * i) % mod;
  cout << (ans + mod) % mod << "\n";
  return 0;
}

### Prompt

Please create a solution in cpp to the following 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.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const int Maxn = 1000005, mod = 998244353;
bool chk[10];
int mx;
int ksm(int x, int k) {
  int ret = 1, tmp = x;
  while (k) {
    if (k & 1) ret = 1ll * ret * tmp % mod;
    tmp = 1ll * tmp * tmp % mod;
    k >>= 1;
  }
  return ret;
}
int inv(int x) { return ksm(x, mod - 2); }
namespace NTT {
void transform(int n, int* a, int type) {
  int k = ceil(log2(n));
  for (int i = 0; i < n; i++) {
    int t = 0;
    for (int j = 0; j < k; j++)
      if (i & (1 << j)) t |= 1 << (k - j - 1);
    if (t > i) swap(a[t], a[i]);
  }
  for (int l = 2; l <= n; l <<= 1)
    for (int *p = a, base = ksm(3, mod / l); p != a + n; p += l)
      for (int i = 0, m = l >> 1, w = 1; i < m; i++, w = 1ll * w * base % mod) {
        int t = 1ll * p[i + m] * w % mod;
        p[i + m] = (p[i] - t) % mod;
        p[i] = (p[i] + t) % mod;
      }
  if (type == -1) {
    reverse(a + 1, a + n);
    int inv_n = inv(n);
    for (int i = 0; i < n; i++) a[i] = 1ll * a[i] * inv_n % mod;
  }
}
vector<int> mul(vector<int> a, vector<int> b) {
  static int A[4 * Maxn], B[4 * Maxn];
  int n = a.size(), m = b.size();
  int N = 1 << int(ceil(log2(n + m)));
  for (int i = 0; i < N; i++) A[i] = i < n ? a[i] : 0;
  for (int i = 0; i < N; i++) B[i] = i < m ? b[i] : 0;
  transform(N, A, 1);
  transform(N, B, 1);
  for (int i = 0; i < N; i++) A[i] = 1ll * A[i] * B[i] % mod;
  transform(N, A, -1);
  return vector<int>(A, A + n + m - 1);
}
}  // namespace NTT
vector<int> mul(int n) {
  if (n == 1) return vector<int>(chk, chk + mx);
  if (n & 1) return NTT::mul(mul(n - 1), vector<int>(chk, chk + mx));
  vector<int> qaq = mul(n / 2);
  return NTT::mul(qaq, qaq);
}
int main() {
  int n, k, ans = 0;
  cin >> n >> k;
  for (int i = 0; i < k; i++) {
    int x;
    cin >> x;
    chk[x] = true;
    mx = max(mx, x + 1);
  }
  vector<int> qaq = mul(n / 2);
  for (int i : qaq) ans = (ans + 1ll * i * i) % mod;
  cout << (ans + mod) % mod << "\n";
  return 0;
}

```