Preparando MOJI

Numbers

4000ms 262144K

Description:

You have a sequence of n distinct integers a1, a2, ..., an (1 ≤ ai ≤ n). You want to remove some integers in such a way that the resulting sequence of integers satisfies the following three conditions:

  1. the resulting sequence is not empty;
  2. the exclusive or (xor operation) of all the integers in the resulting sequence equals 0;
  3. if you write all the integers of the resulting sequence (from beginning to the end) in a row in the decimal numeral system and without any spaces, the written number is divisible by p.

You are given the sequence of n integers a and a prime number p, find a way to satisfy the described conditions.

Input:

The first line of the input contains two integers n and p (1 ≤ n, p ≤ 50000). Next line contains n space-separated distinct integers a1, a2, ..., an (1 ≤ ai ≤ n).

It is guaranteed that p is a prime number.

Output:

If there is no solution for the given input, print "No" (without quotes) in the only line of the output.

Otherwise print "Yes" in the first line of output. The second line should contain an integer k (k > 0) specifying the number of remaining elements and the third line should contain k distinct integers x1, x2, ..., xk (1 ≤ xi ≤ n). These integers mean that you should remove all integers from the sequence except integers ax1, ax2, ..., axk to satisfy the described conditions.

If there are multiple solutions, any of them will be accepted.

Sample Input:

3 3
1 2 3

Sample Output:

Yes
3
1 2 3

Sample Input:

3 5
1 2 3

Sample Output:

No

Informação

Codeforces

Provedor Codeforces

Código CF241D

Tags

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 08:40:19

Relacionados

Nada ainda