#arc141d. [arc141_d]Non-divisible Set
[arc141_d]Non-divisible Set
Problem Statement
We say that a set of positive integers is good when, for any , is not a multiple of .
You are given a set of integers between and (inclusive): .
For each , determine whether there exists a good set with elements that is a subset of containing .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print lines. The -th line should contain Yes
if there exists a good set with elements that is a subset of containing , and No
otherwise.
Sample Input 1
5 3
1 2 3 4 5
Sample Output 1
No
Yes
Yes
Yes
Yes
Trivially, the only good set containing is , which has just one element, so the answer for is No
.
There is a good set containing , so the answer for is Yes
.
Sample Input 2
4 4
2 4 6 8
Sample Output 2
No
No
No
No
Sample Input 3
13 10
2 3 4 6 7 9 10 11 13 15 17 19 20
Sample Output 3
No
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No