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 itertools import combinations


# function to generate all the sub lists
def sub_lists(l):
    # initializing empty list
    comb = []

    # Iterating till length of list
    for i in range(len(l) + 1):
        # Generating sub list
        comb += [list(j) for j in combinations(l, i)]
    # Returning list
    return comb


# driver code
# Initial list
n, m = map(int, input().split())
l1 = list(map(int, input().split()[:n]))

final_list = sub_lists(l1)
flag = 0
for k in final_list:
    if sum(k) == m:
        flag = 0
        print("YES")
        break
    else:
        flag = 1
        continue
if flag == 1:
    print("NO")
