Watermelon

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 showed w kilos. 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 should help them and find out, if they can divide the watermelon in the way they want. For sure, each of them should get a part of 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 two parts, each of them weighing even number of kilos; and NO in the opposite case.

Examples
Input
8
Output
YES

当重量为大于2的偶数时,两人才都可分配到偶数公斤的西瓜。

#include<iostream>
using namespace std;
void main()
{
    int w;
    cin >> w;
    if (w == 2 || w % 2 != 0)
        cout << "NO";
    else
        cout << "YES";
}
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,504评论 0 10
  • 考上状元,可以说是中国古代文人的终极目标。“十年窗下无人问,一举成名天下知”、“书中自有黄金屋,书中自有颜如...
    真老实人_425a阅读 3,378评论 4 8
  • 枯枝从老树上落下 没有跟老树高别 就被河水冲的很远 老树借由风的力量 艰难的挥舞着枝丫 与它告别,予它祝福 带着对...
    偌风听雨阅读 199评论 0 0
  • 仿写: 当她登上高地,眼前无际的草甸如同一幅巨画在天地间延展开来,初秋的阳光为大地染上明媚的金黄,她忍不住...
    chenhong_01b9阅读 264评论 5 3