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
def input()   : return sys.stdin.readline().strip()
def getints() : return map(int,sys.stdin.readline().strip().split())

import bisect
left  = lambda l,a : bisect.bisect_left(l,a)
right = lambda l,a : bisect.bisect_right(l,a)

sys.setrecursionlimit(1000000)

n,m = getints()
l = list(getints())

c = {}
for x in l:
    x %= m
    if x in c: c[x] += 1
    else: c[x] = 1

s = set()
for x in c:
    t = x
    for y in range(c[x]):
        s.add(t%m)
        t = (t+x)%m
        
l = list(s)
n = len(l)

def solve(t,i):
    if t == 0: return True
    if i >= n: return False
    return solve((t+l[i])%m,i+1) or solve(t,i+1)
print('YES' if solve(m,0) else 'NO')