You are given a sequence of numbers a1, a2, ..., an, and a number m.

Check if it is possible to choose a non-empty subsequence aij such that the sum of numbers in this subsequence is divisible by m.

Input

The first line contains two numbers, n and m (1 ≤ n ≤ 106, 2 ≤ m ≤ 103) — the size of the original sequence and the number such that sum should be divisible by it.

The second line contains n integers a1, a2, ..., an (0 ≤ ai ≤ 109).

Output

In the single line print either "YES" (without the quotes) if there exists the sought subsequence, or "NO" (without the quotes), if such subsequence doesn't exist.

Examples

Input

3 5
1 2 3


Output

YES


Input

1 6
5


Output

NO


Input

4 6
3 1 1 3


Output

YES


Input

6 6
5 5 5 5 5 5


Output

YES

Note

In the first sample test you can choose numbers 2 and 3, the sum of which is divisible by 5.

In the second sample test the single non-empty subsequence of numbers is a single number 5. Number 5 is not divisible by 6, that is, the sought subsequence doesn't exist.

In the third sample test you need to choose two numbers 3 on the ends.

In the fourth sample test you can take the whole subsequence.
#include <bits/stdc++.h>
using namespace std;
inline long long getint() {
  long long _x = 0, _tmp = 1;
  char _tc = getchar();
  while ((_tc < '0' || _tc > '9') && _tc != '-') _tc = getchar();
  if (_tc == '-') _tc = getchar(), _tmp = -1;
  while (_tc >= '0' && _tc <= '9') _x *= 10, _x += (_tc - '0'), _tc = getchar();
  return _x * _tmp;
}
long long md = 1000000007;
const long long inf = (long long)1e16;
long long _mx = -inf;
inline long long mulD(long long a, long long b) {
  long long r = 0;
  while (b > 0) {
    if (b & 1) {
      r = r + a % md;
      r = r % md;
    }
    b /= 2;
    a = 2 * a % md;
    a = a % md;
  }
  return r % md;
  ;
}
inline long long exp(long long a, long long b) {
  long long r = 1LL;
  while (b > 0) {
    if (b & 1) {
      r = r * (a % md);
      r = (r + md) % md;
    }
    b /= 2;
    a = (a % md) * (a % md);
    a = (a + md) % md;
  }
  return (r + md) % md;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
inline long long poww(long long a, long long b) {
  long long r = 1LL;
  while (b > 0) {
    if (b & 1) r = r * a;
    b /= 2;
    a = a * a;
  }
  return (long long)r;
}
long long a[1000000 + 1], dp[1001][1001];
long long f(long long x, long long n, long long want, long long ut = 0) {
  if (x == n + 1) {
    if (want == 0 && ut == 1) return 1;
    return 0;
  }
  if (want == 0 && ut == 1) return 1;
  if (dp[x][want] != -1) return dp[x][want];
  long long nxt = want - a[x] % md;
  nxt = (nxt + md) % md;
  long long ans = f(x + 1, n, nxt, 1) || f(x + 1, n, want);
  dp[x][want] = ans;
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t, i, s, j, m, x, y, z, k, q, n, p, T;
  string s1, s2, s3;
  x = 0;
  cin >> n >> md;
  ;
  for (long long i = (1); i <= (n); ++i) cin >> a[i];
  if (n > md) cout << "YES", exit(0);
  memset((dp), -1, sizeof((dp)));
  if (f(1, n, 0)) cout << "YES", exit(0);
  cout << "NO";
}
