A. Watermelon

Source: Internet
Author: User
Time limit per test

1 second

Memory limit per test

64 megabytes

Input

Standard Input

Output

Standard output

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 that the watermelon was weighed, and the scales showedWKilos.
They rushed home, dying of thirst, and decided to divide the berry, however they faced a hard problem.

Pete and Billy are great fans of even numbers, that's why they want to divide the watermelon in such a way that each of the two parts weighs even number of kilos, at the same time it is not obligatory that the parts are equal. the boys are extremely tired and
Want to start their meal as soon as possible, that's why you shoshould help them and find out, if they can divide the watermelon in the way they want. for sure, each of them shocould get a part of positive weight.

Input

The first (and the only) input line contains integer numberW(1 digit ≤ DigitWLimit ≤0000100)
-The weight of the watermelon bought by the boys.

Output

Print yes, if the boys can divide the watermelon into two parts, each of them weighing even number of kilos; and no in
The opposite case.

Sample test (s) Input
8
Output
YES

Solution Description: you only need to determine whether W is a multiple of 2. Pay attention to the situation where W = 2.

#include<iostream>#include<cstdio>using namespace std;int main(){  int w;  cin>>w;  if(w%2==0&&w!=2){ cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}return 0;}

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.