#include <bits/stdc++.h>   using namespace std;   long long int newarr[1005];   long long int dp[1005][1005];   long long int n, k;   long long int solution(long long int index, long long int m) {     if (m < 0) m += k;     if (index >= n && m != 0)       return 0;     else if (m == 0)       return 1;     else if (dp[index][m] != -1)       return dp[index][m];     else {       long long int x = solution(index + 1, m);       long long int y = solution(index + 1, m - newarr[index]);       if (x > 0) x = 1;       if (y > 0) y = 1;       if (m >= newarr[index]) {         dp[index + 1][m - newarr[index]] = y;       }       dp[index + 1][m] = x;       return x + y;     }   }   int32_t main() {     memset(dp, -1, sizeof(dp));     cin >> n;     cin >> k;     long long int arr[n];     long long int ctr = 0;     for (long long int i = 0; i < n; i++) {       cin >> arr[i];     }     if (n > k) {       cout <<  YES n ;     } else {       for (long long int i = 0; i < n; i++) {         newarr[i] = arr[i] % k;         if (newarr[i] == 0) ctr++;       }       long long int x = solution(0, k);       if (x > 0 || ctr > 0)         cout <<  YES n ;       else         cout <<  NO ;     }   }   