Greatest Common Divisor
Easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Today at the math class the sixth-grader Peter studied the concept of greatest common divisor. Peter immediately decided to apply this knowledge in practice.
Peter wrote on a piece of paper integers — the house numbers, where his friends live. Now he wants to choose a subset from these numbers so that their greatest common divisor equals to his favorite number .
Help Peter to choose from given numbers the desired subset.
Input
First line contains two integers and . Second line contains integers .
Output
If there is a desired subset, print in the first line number the size of this subset. On the second line print the numbers included in this subset.
If solution does not exist, print number .
If there are several answers, print any of them.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 368
Acceptance rate 27%