Watermelontime limit:1000msmemory limit:65536kbthis problem'll be judged onCodeforces. Original id:4a
64-bit integer IO format:%i64dJava class Name:(Any)Prev Submit Status Statistics discuss Next
One hot summer day Pete and his friend Billy decided to buy a watermelon. They chose the biggest and the ripest one, in their opinion. After the watermelon is weighed, and the scales showed w kilos. They rushed home, dying of thirst, and decided to divide the berry, however they faced a hard problem.
Pete and Billy is great fans of even numbers, that's why they want to divide the watermelon in such a-the-the-each of th E. Parts weighs even number of kilos, at the same time it was not obligatory that the parts was equal. The boys is extremely tired and want to start their meal as soon as possible, that's why you should help them and find OU T, if they can divide the watermelon in the they want. For sure, each of the them should get a part of the positive weight.
Input
The first (and the only) input line contains integer number w (1?≤? W≤?100)-the weight of the watermelon bought by the boys.
Output
Print YES, if the boys can divide the watermelon into a parts, each of them weighing even number of kilos; and NO in the opposite case.
Sample Inputinput
8
Output
YES
Hint
For example, the boys can divide the watermelon into the parts of 2 and 6 kilos respectively (another variant-two parts of 4 and 4 kilos).
Sourcecodeforces Beta Round #4 (Div. 2 only)Test Instructions:
Two people on average divide a watermelon, get must be an integer!
First, to be able to split the same even number, the original must be an even number, and more than 2
AC Code:
#include <iostream>using namespace Std;int main () { int n; while (Cin>>n) { if (n>2&&n%2==0) cout<< "YES" <<endl; else cout<< "NO" <<endl; } return 0;}
CF 4 A watermelon (water??!!)