For two positive integers $$$x$$$ and $$$y$$$, define $$$lud(x,y)$$$ as the smallest positive integer $$$z$$$ that divides $$$x$$$ and doesn't divide $$$y$$$. If there is no such element, then $$$lud(x,y) = -1$$$.
For example:
$$$lud(6,4) = 3$$$
$$$lud(8,10) = 4$$$
$$$lud(10,20) = -1$$$
Given an array $$$a$$$ of size $$$n$$$ and an integer $$$x$$$, for each $$$i$$$ $$$(1 \le i \le n)$$$, find $$$lud(x,a_i)$$$.
The first line contains two integers $$$n$$$ and $$$x$$$ $$$(1 \le n \le 10^6)$$$ $$$(1 \le x \le 10^{12})$$$, the length of the array $$$a$$$ and the integer $$$x$$$ respectively.
The second line contains $$$n$$$ integers $$$(1 \le a_i \le 10^{12})$$$, the elements of the array $$$a$$$.
Print $$$n$$$ integers, the $$$i_{ith}$$$ of which is $$$lud(x,a_i)$$$.
5 306 10 15 35 60
5 3 2 2 -1