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 math import inf
from collections import *
import math, os, sys, heapq, bisect, random,threading
from functools import lru_cache
from itertools import *
def inp(): return sys.stdin.readline().rstrip("\r\n")
def out(var): sys.stdout.write(str(var))  # for fast output, always take string
def inpu(): return int(inp())
def lis(): return list(map(int, inp().split()))
def stringlis(): return list(map(str, inp().split()))
def sep(): return map(int, inp().split())
def strsep(): return map(str, inp().split())
def fsep(): return map(float, inp().split())
M,M1=1000000007,998244353
def main():
    how_much_noob_I_am=1
    #how_much_noob_I_am=inpu()
    for _ in range(1,how_much_noob_I_am+1):
        n,m=sep()
        arr=lis()
        if n>m:
            print("YES")
            exit()
        l=[]
        for i in range(n):
            l.append(arr[i]%m)
        if 0 in l:
            print("YES")
            exit()
        dp=[[False]*(m+1) for i in range(n+1)]
        for i in range(n+1):
            dp[i][0] = True
        ans=[]
        def fun(i,res):
            nonlocal ans
            if res>0:
                ans.append(res)
            if i==len(arr):
                return
            fun(i+1,res+arr[i])
            fun(i+1,res)
        fun(0,0)
        for i in ans:
            if i%m==0:
                print("Yes")
                break
        else:
            print("No")

if __name__ == '__main__':
    main()
