| The 2022 SDUT Summer Trials |
|---|
| Finished |
Ginger gives you a sequence of length $$$n$$$, please ask if there are two non-empty different subsequences in this sequence, such that $$$s_1 \equiv s_2 \pmod k$$$, $$$s_1, s_2$$$ are the sum of the two subsequences respectively.
If there exist, output $$$\text{YES}$$$, otherwise output $$$\text{NO}$$$.
The first line contains two integers $$$n, k$$$ $$$(1 \le n,k \le 10 ^ 5)$$$ indicating the lenth of sequence and modulo.
The second line contains $$$n$$$ integers $$$a_1,a_2, \dots, a_n$$$ indicating the sequence.
Print $$$\text{YES}$$$ or $$$\text{NO}$$$.
5 10 1 2 3 4 5
YES
Subsequence is a sequence that can be derived from another sequence by deleting some elements without changing the order of the remaining elements.
| Name |
|---|


