Pebbles
The Law of the Jungle clearly states that any wolf who starts a family may leave his Pack. However, once his cubs are grown and independent, he must present them to the Pack Council, which typically convenes once a month during the full moon, to introduce them to the other wolves.
Father Wolf waited patiently until his cubs were old enough to run a little. On one of those nights when the pack gathered, he brought the cubs, Mowgli, and Mother Wolf to the Council Rock. This was a hilltop area filled with large boulders, providing hiding spots for the entire pack. Akela, the great gray lone wolf, chosen as the leader of the pack for his strength and agility, addressed the assembly from his rock:
— The law is known to you, the law is known to you! Look, wolves!
Father Wolf nudged Mowgli, the Frog, into the center of the circle. Sitting on the ground, Mowgli laughed and began to play with the pebbles that sparkled in the moonlight. The game was simple. He could move k[1]
, k[2]
, k[3]
, ..., kn
pebbles from one pile to another, and also transfer back k[1]
, k[2]
, k[3]
, ..., kn
pebbles from the second pile to the first. He wondered if it was possible to have exactly m
pebbles in the second pile.
Input
The first line contains two integers n
and m
(2 ≤ n ≤ 1000, 2 ≤ m ≤ 2·10^9)
. The second line contains n
natural numbers k[1]
, k[2]
, k[3]
, ..., kn
(k[i]
≤ 2·10^9
).
Output
Print "YES" if it is possible to have exactly m pebbles in the second pile, and "NO" otherwise.