| Vagaa, EMule and Apple |
| Time limit:1000 MS |
Memory limit:65536 K |
| Total submit:105(all users) |
Total accepted:54(users) |
Rating: |
Special Judge: No |
|
| Description |
|
Vagaa is a strange dog and EMule are a strange mule. They is friends.
They love apples and math.
One day, they buy a Big Apple which weighs w kilos. They wonder whether they can divide it into exactly a-parts in a-a-on-each-part weighs even number of kilos. |
| Input |
|
There is multiple test cases. The first line of input was an integer T indicating the number of test cases. Then T test Cases follow.
For each test case:
Line 1. This line contains an integer w (1≤ w ≤100). |
| Output |
|
For each test case:
Line 1. Output "YES" if they can, otherwise output "NO". |
| Sample Input |
|
1
10 |
| Sample Output |
|
YES |
| Hint |
|
In the sample, they can divide the apple into the parts of 2 and 8 kilos. |
| Source |
| Harbin Tech 2012 Spring School race-live race (warm up) |
| Author |
| Zidaratu @hrbust |
Three stars for this problem
#include<iostream>
#include<algorithm>
#include<cmath>
Using NamespaceStd;
IntMain()
{
IntT;
While(~scanf("%d",&T))
{
While(T--)
{
IntN;
scanf("%d",&N);
IntI;
IntKey=0;
For(I=2;I<=N/2;I+=2)
{
If((N-I)%2==0)
{
Key=1;
Break;
}
}
If(Key==1)
{
Cout<< "YES" <<endl
}
else
Span class= "pun" >{
Cout<< "NO" <<endl;
}
}
}
return 0;
} /span>
Vagaa, EMule, and Apple