Gone bananas

2.2

17 votes
Easy, Grammar-Verified, Math, Number Theory, Primality test, Prime number
Problem

You are required to distribute N bananas among some people according to the following conditions:

  • You can select the number of people that receive bananas.
  • Each person should get more than one banana.
  • One person cannot receive all the bananas.
  • All the N bananas must be distributed.
  • Each person can only receive an integral number of bananas.

Write a program to determine whether the bananas can be distributed among the people.

Input format

  • First line: T denoting the number of test cases
  • Next T lines: N

Output format

For each test case, print Yes or No depending upon the result.

Constraints

2T105
1N106

Sample Input
2
2
4
Sample Output
No
Yes
Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

Explanation of the first test case:
2 bananas cannot be distributed among a group of any size. Suppose a group of size 1 is considered, then one person takes all the bananas. If a group of size 2, then each person get only 1 banana that violates the rule of distribution.
Explanation of the second test case:
4 bananas can be equally distributed among 2 people where each person gets 2 bananas.

Contributers:
Editor Image

?