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 numpy as np
n , m = map(int, input().split(' '))

a=[]

a = [int(x) for x in input().split(' ')]

if n>m:
    print("YES")
    exit()

dp = [[[None for i in range(2)] for j in range(m)] for k in range(n + 1)]

def check():
    global dp, a,n,m

    for i in range(n,-1,-1):
        for mod in range(0,m):
            for flag_l in [0, 1]:
                if(i == n):
                    if (mod == 0 and flag_l == 1):
                        dp[i][mod][flag_l] = 1
                    continue
 
                x = dp[i + 1][(mod + a[i]) % m][1]
                y = dp[i + 1][mod][flag_l]
                dp[i][mod][flag_l] = x or y
    
    return dp[0][0][0]


if check():
    print("YES")
else:
    print("NO")