Bayan Programming Contest

Bayan Programming Contest

D. Numbers
time limit per test: 6 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

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.


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

It is guaranteed that p is a prime number.


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 test(s)
3 3
1 2 3
1 2 3
3 5
1 2 3