#include <bits/stdc++.h>
using namespace std;
template <class T>
void print(vector<T> s) {
  for (auto x : s) cout << x << " ";
  cout << endl;
}
namespace fft {
const int mod = 998244353;
const int primitiveRoot = 3;
int base = 1;
vector<int> rev = {0, 1};
vector<long long> roots[2] = {{0, 1}, {0, 1}};
inline int power(long long a, int n) {
  int res = 1;
  while (n > 0) {
    if (n & 1) res = res * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return res;
}
inline int inv(int a) { return power(a, mod - 2); }
inline void ensureBase(int b) {
  if (b <= base) return;
  rev.resize(1 << b);
  for (int i = 0; i < (1 << b); i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (b - 1));
  roots[0].resize(1 << b);
  roots[1].resize(1 << b);
  while (base < b) {
    int root = power(primitiveRoot, (mod - 1) / (1 << (base + 1)));
    int iroot = inv(root);
    for (int i = (1 << (base - 1)); i < (1 << base); i++) {
      roots[0][i << 1] = roots[0][i];
      roots[1][i << 1] = roots[1][i];
      roots[0][(i << 1) | 1] = roots[0][i << 1] * root % mod;
      roots[1][(i << 1) | 1] = roots[1][i << 1] * iroot % mod;
    }
    base++;
  }
}
inline void fft(vector<int> &f, int n, int flag = 0) {
  int shift = 0;
  while ((1 << shift) < n) shift++;
  ensureBase(shift);
  shift = base - shift;
  for (int i = 0; i < n; i++)
    if (i < (rev[i] >> shift)) swap(f[i], f[rev[i] >> shift]);
  for (int len = 1; len < n; len <<= 1) {
    for (int i = 0; i < n; i += 2 * len) {
      for (int j = i, k = i + len; j < i + len; j++, k++) {
        long long z = roots[flag][k - i] * f[k] % mod;
        f[k] = f[j] - z;
        if (f[k] < 0) f[k] += mod;
        f[j] = f[j] + z;
        if (f[j] >= mod) f[j] -= mod;
      }
    }
  }
}
inline vector<int> multiply(vector<int> a, vector<int> b) {
  int need = a.size() + b.size() - 1;
  int bb = 0;
  while ((1 << bb) < need) bb++;
  bb = (1 << bb);
  a.resize(bb);
  fft(a, bb);
  b.resize(bb);
  fft(b, bb);
  for (int i = 0; i < bb; i++)
    a[i] = (long long)a[i] * b[i] % mod * inv(bb) % mod;
  fft(a, bb, 1);
  a.resize(need);
  return a;
}
}  // namespace fft
using namespace fft;
vector<int> power(vector<int> s, int n) {
  if (n == 1) return s;
  vector<int> lst = power(s, n / 2);
  lst = multiply(lst, lst);
  if (n & 1) return multiply(lst, s);
  return lst;
}
const int modd = 998244353;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  vector<int> s(10);
  for (int i = 0; i < k; i++) {
    int x;
    cin >> x;
    s[x] = 1;
  }
  while (s.back() == 0) s.pop_back();
  s = power(s, n / 2);
  long long answer = 0;
  for (int i = 0; i < s.size(); i++) {
    answer += (long long)s[i] * s[i];
    answer %= modd;
  }
  cout << answer << endl;
  return 0;
}

### Prompt

Generate a cpp solution 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;
template <class T>
void print(vector<T> s) {
  for (auto x : s) cout << x << " ";
  cout << endl;
}
namespace fft {
const int mod = 998244353;
const int primitiveRoot = 3;
int base = 1;
vector<int> rev = {0, 1};
vector<long long> roots[2] = {{0, 1}, {0, 1}};
inline int power(long long a, int n) {
  int res = 1;
  while (n > 0) {
    if (n & 1) res = res * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return res;
}
inline int inv(int a) { return power(a, mod - 2); }
inline void ensureBase(int b) {
  if (b <= base) return;
  rev.resize(1 << b);
  for (int i = 0; i < (1 << b); i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (b - 1));
  roots[0].resize(1 << b);
  roots[1].resize(1 << b);
  while (base < b) {
    int root = power(primitiveRoot, (mod - 1) / (1 << (base + 1)));
    int iroot = inv(root);
    for (int i = (1 << (base - 1)); i < (1 << base); i++) {
      roots[0][i << 1] = roots[0][i];
      roots[1][i << 1] = roots[1][i];
      roots[0][(i << 1) | 1] = roots[0][i << 1] * root % mod;
      roots[1][(i << 1) | 1] = roots[1][i << 1] * iroot % mod;
    }
    base++;
  }
}
inline void fft(vector<int> &f, int n, int flag = 0) {
  int shift = 0;
  while ((1 << shift) < n) shift++;
  ensureBase(shift);
  shift = base - shift;
  for (int i = 0; i < n; i++)
    if (i < (rev[i] >> shift)) swap(f[i], f[rev[i] >> shift]);
  for (int len = 1; len < n; len <<= 1) {
    for (int i = 0; i < n; i += 2 * len) {
      for (int j = i, k = i + len; j < i + len; j++, k++) {
        long long z = roots[flag][k - i] * f[k] % mod;
        f[k] = f[j] - z;
        if (f[k] < 0) f[k] += mod;
        f[j] = f[j] + z;
        if (f[j] >= mod) f[j] -= mod;
      }
    }
  }
}
inline vector<int> multiply(vector<int> a, vector<int> b) {
  int need = a.size() + b.size() - 1;
  int bb = 0;
  while ((1 << bb) < need) bb++;
  bb = (1 << bb);
  a.resize(bb);
  fft(a, bb);
  b.resize(bb);
  fft(b, bb);
  for (int i = 0; i < bb; i++)
    a[i] = (long long)a[i] * b[i] % mod * inv(bb) % mod;
  fft(a, bb, 1);
  a.resize(need);
  return a;
}
}  // namespace fft
using namespace fft;
vector<int> power(vector<int> s, int n) {
  if (n == 1) return s;
  vector<int> lst = power(s, n / 2);
  lst = multiply(lst, lst);
  if (n & 1) return multiply(lst, s);
  return lst;
}
const int modd = 998244353;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  vector<int> s(10);
  for (int i = 0; i < k; i++) {
    int x;
    cin >> x;
    s[x] = 1;
  }
  while (s.back() == 0) s.pop_back();
  s = power(s, n / 2);
  long long answer = 0;
  for (int i = 0; i < s.size(); i++) {
    answer += (long long)s[i] * s[i];
    answer %= modd;
  }
  cout << answer << endl;
  return 0;
}

```