#t316. 判断整除

判断整除

Divisibility Check

Problem Background

Special for beginners, ^_^

Problem Description

For a given sequence of positive integers, insert a + or - sign before each number and compute their sum. For example, the sequence 1, 2, 4 has 8 possible signed sums:

(+1) + (+2) + (+4) = 7
(+1) + (+2) + (-4) = -1
(+1) + (-2) + (+4) = 3
(+1) + (-2) + (-4) = -5
(-1) + (+2) + (+4) = 5
(-1) + (+2) + (-4) = -3
(-1) + (-2) + (+4) = 1
(-1) + (-2) + (-4) = -7

If at least one of all the results is divisible by the integer kk, we say this sequence of positive integers is divisible by kk. For example, the sequence above is divisible by 3,5,73, 5, 7 but not by 2,4,6,8,…2, 4, 6, 8, \dots. Note that 0,−3,−6,−9,…0, -3, -6, -9, \dots are all considered multiples of 33.

Input Format

The first line contains two numbers: NN (2<N<100002 < N < 10000) and kk (2<k<1002 < k < 100), where NN is the number of integers in the sequence and kk is the divisor. The second line gives the NN integers of the sequence, each between 00 and 1000010000 (possibly with repeats).

Output Format

If the sequence is divisible by kk, output YES; otherwise output NO. (Note: all uppercase letters.)

Sample Input 1

3 2
1 2 4

Sample Output 1

NO

Constraints

1s, 1024KiB for each test case.