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>).
from collections.abc import Iterable


def flatten(items):
    for x in items:
        if isinstance(x, Iterable):
            yield from flatten(x)
        else:
            yield x
    
            
def compute(lst):
    if len(lst) == 0:
        return [[]]
    result = []
    for i in compute(lst[1:]):
        _sum = sum(flatten(i)) if isinstance(i, Iterable) else i
        result += [i, _sum + lst[0]]
    return result
    
    
if _name_ == "_main_":
   num = list(map(int, input().split()))[1]
   ls = list(map(int,  input().split()))
#   result = any(i % num == 0 for i in set(flatten(compute(ls))))
   result = any(map(lambda i: i % num ==0, set(flatten(compute(ls))))) 
   if result:
       print('YES')
   else:
       print('NO')