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>).
##def fsum(n):
   ## dp = [0]*(n+1)
    ##if n ==0:
    #    return 0
    #if n== 1:
      #  return 1 
    
    #if dp[n]:
     #   return dp[n]
    #dp[n] += fsum(n-1) + fsum(n-2)
    #return dp[n]

#def fsum2(n,m):
#	s = fsum(m+2)-fsum(n+1)
#	return (s%1000000007)
#for i in range(int(input())):
 #   n,m = map(int,input().split())
  #  print (fsum2(n,m))
from collections import defaultdict
def check(L,n,m):
    if n+1>m:
        return True
    d=defaultdict(list)
    for i in L:
        k = i%m
        d[k].append(i)
       
    for i in d:
        for j in range(1,len(d[i])+1):
            if (i*j)%m  ==0:
                return True
        for k in d:
            if k!=i and (k+i)%m==0:
                return True
    return False
n,m = map(int, input().split())
L = list(map(int, input().split()))

if check (L,n,m) == True:
    print("YES")
else:
    print("NO")