401459: GYM100460 E Blood of Elves
Description
Evil dark magician Deimos, usurped the throne of Enia, has an insidious malicious plan. Magic sphere El-Gilet, which makes a barrier between Enia and the human world, has some undocumented functions and can be used, for instance, to open gates to the iced world of Deimos. Through the opened gates evil forces will be able to easily invade Enia and finally solve the Elvish Question. To open the gates, one needs to crimson the sphere by elvish blood during so-called night of Superposition, also known as incomplete parade of stars. Deimos already has some ideas where to get the required amount of blood from, so now he wants to know, how soon the night of Superposition comes.
There are n small stars in Enia, revolving around motionless Earth in one plane by the circular orbits, and the i-th star makes a full rotation within ti days. It is considered that complete parade of stars is such a situation when, looking from the altar in the throne room of the palace, all stars are directly above a spectator. It is also known that such an astronomical phenomenon was observed m days ago. Possibly it could repeat after that.
But the night of Superposition is incomplete parade of stars, i.e. such a situation when all stars but one are directly above the spectator. Deimos is currently not sure which star exactly should not take part in the parade, so he decided to find out for each star, how many days later there will be incomplete parade of stars without this star. Also, Deimos isn't planning to wait more than 109 days: in this case he would rather think out a different insidious malicious plan.
InputThe first line contains two integers separated by the space: n and m (2 ≤ n ≤ 105, 1 ≤ m ≤ 109) — the number of stars on the Enia's sky and the number of days passed from one of the complete parade of stars, correspondingly.
The second line contains n integers separated by the spaces: ti (1 ≤ ti ≤ 109) — the number of days required for the i-th star to make a full rotation around the Earth.
OutputOutput n lines, the i-th of which should contain a single integer — the number of days till the next incomplete parade of stars without the i-th star. In particular, if some incomplete parade is taking place right today, output 0 in the corresponding line. If such a parade will not take place for the next 109 days, output in the corresponding line «Never» (without quotes).
ExamplesInput6 8Output
3 2 9 2 7 2
NeverInput
Never
34
Never
10
Never
5 100000000Output
20000000 5000000 70000000 15000000 9000000
530000000
Never
80000000
Never
320000000