CF 4 A watermelon (water??!!)

Source: Internet
Author: User



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??!!)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.