Alice and Bob engage in a strategic duel called Number Magic, where Alice initially chooses a positive integer $N$ called the starting number. The game permits two specific magic operations to be performed on a positive integer $K$:
There are $Q$ rounds of the duel. In round $i$, Bob picks a target number $M_i$ and the Alice must determine if it is possible to apply at most $32$ magic operations to the starting number $N$ in order to reach $M_i$. That is, Alice should find a sequence $N_0,N_1,N_2,\dots ,N_k$ with $k≤32$ such that $N_0=N$ and $N_i$ can be obtained by applying a magic operation to $N_{i-1}$ for each $1≤i≤k$? Note, only $M_i$ will change between rounds: $N$ will be the same in each round.
This is a very challenging game, Alice has asked you for help!
The first line of input contains two space integers, $N$ ($1≤N≤10^{16}$) and $Q$ ($1≤Q≤1000$) where $N$ is the starting number that Alice chooses and $Q$ is the number of rounds.
Then $Q$ lines follow, the $i$’th such line containing a single integer $M_i$ ($1≤M_i≤10^{16}$) indicating the target number that Bob chooses for round $i$.
Output $Q$ lines where line $i$ contains the text YES if it is possible to transform $N$ into $M_i$ using at most $32$ applications of magic, otherwise line $i$ contains the text NO.