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;
const double EPS = 1e-9;
const double PI = 3.14159265359;
vector<long long> primes;
void GeneratingPrimes(int top) {
  vector<bool> p(top + 1, 1);
  p[0] = p[1] = 0;
  for (int i = 2; i <= sqrt(top); i++) {
    if (!p[i]) continue;
    if (p[i]) {
      for (int j = i * i; j <= top; j += i) {
        p[j] = 0;
      }
    }
  }
  for (int i = 0; i < top + 1; i++)
    if (p[i]) primes.push_back(i);
}
long long gcd(long long a, long long b) { return (b == 0) ? a : gcd(b, a % b); }
void EXTgcd(long long a, long long b, int &x0, int &y0) {
  if (b == 0) {
    x0 = 1, y0 = 0;
    return;
  }
  EXTgcd(b, a % b, x0, y0);
  long long x1 = y0;
  long long y1 = x0 - (a / b) * y0;
  x0 = x1;
  y0 = y1;
}
long long POW(long long x, long long p) {
  long long ret = 1;
  while (p) {
    if (p & 1) ret *= x;
    x *= x;
    p /= 2;
  }
  return ret;
}
double dist(int a, int b, int x, int y) {
  return sqrt(pow(a - x, 2) + pow(b - y, 2));
}
int xadd[9] = {1, -1, 0, 1, -1, 0, 1, -1, 0};
int yadd[9] = {1, -1, 0, -1, 0, 1, 0, 1, -1};
int n, m;
int a[3000];
int memo[3000][3000];
bool solve(int x = 1, int need = m, bool tk = 0) {
  if (need == 0 && tk) return 1;
  if (x > 2000) return 0;
  int &ret = memo[x][need];
  if (~ret) return ret;
  ret = solve(x + 1, need, tk);
  if (ret) return ret;
  int sum = 0;
  ret = 0;
  for (int i = 0; i < a[x]; i++) {
    sum += x;
    ret = solve(x + 1, (need - sum + m) % m, 1);
    if (ret) return 1;
  }
  return ret;
}
int main() {
  memset(memo, -1, sizeof memo);
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    x %= m;
    if (!x) {
      { cout << "YES\n"; }
      return 0;
    }
    a[x]++;
  }
  if (solve()) {
    cout << "YES\n";
  } else {
    cout << "NO\n";
  }
  return 0;
}
