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>).
import sys
a,b=list(map(int,input().split()))
c=list(map(int,input().split()))
d=list(j%b for j in c)
# print(d)
if a>=b: 
    print("YES")
    sys.exit()
e=[[0]*(b+1) for _ in range(a+1)]

for i in range(1,a+1):
    e[i][d[i-1]]=1
    
for i in range(2,a+1):
    for j in range(0,b):
        if e[i][j]==1:continue
        if e[i-1][j]==1: e[i][j]=e[i-1][j];continue
        e[i][j]=e[i-1][(j-d[i-1]+b)%b]

if e[a][0]==1:
    print("YES")
else:
    print("NO")