You are given a sequence of numbers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub>, and a number *m*.

Check if it is possible to choose a non-empty subsequence *a*<sub class="lower-index">*i*<sub class="lower-index">*j*</sub></sub> such that the sum of numbers in this subsequence is divisible by *m*.
The first line contains two numbers, *n* and *m* (1 ≤ *n* ≤ 10<sup class="upper-index">6</sup>, 2 ≤ *m* ≤ 10<sup class="upper-index">3</sup>) — the size of the original sequence and the number such that sum should be divisible by it.

The second line contains *n* integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> (0 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>).
#I = lambda: [int(i) for i in input().split()]
#import io, os, sys
#input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline


# n = int(input())
# l1 = list(map(int,input().split()))
# n,x = map(int,input().split())
# s = input()
mod = 1000000007
# print("Case #"+str(_+1)+":",)

from collections import defaultdict
import sys
import bisect

n , m  =  map(int,input().split())
l = list(map(int,input().split()))
dp = [[False for i in range(m+1)] for j in range(n+1)]
s=0
for i in range(n+1):
    s+=l[i-1]
    for j in range(m+1):
        if i==0:
            dp[i][j]=False
        if j==0:
            dp[i][j] =True
        elif l[i-1]<=j:
            dp[i][j] = dp[i-1][j] or dp[i-1][j-l[i-1]]
        else:
            dp[i][j]=dp[i-1][j]
f=0
for i in range(1,m+1):
    if (not i%m) and dp[n][i]:
        f=1
        break
if f or (s>=m and dp[n][s%m]):
    print("YES")
else:
    print("NO")

        

