There are N cities in the world of GraphLand numbered from 1 to N. The only way to travel between cities is through ferries. There are N-1 agencies numbered from 2 to N.
The ith agency operates a both way ferry service, between city i and all its multiples.
Owing to your traveling nature, you have a travel plan which consists of M trips.
Input:
First line contains two integers N and M, denoting the number of the cities in Graphland and the number of trips respectively.
Each of the next M lines, contain two integers L and R.
Output:
For each question, print "YES" if you can reach city R starting your journey from city L(taking any number of existing ferries), otherwise "NO".(without double-quotes)
Constraints:
1 <= N <= 10^12
1 <= M <= 10^5
1 <= L,R <= N