当前位置: 代码迷 >> 综合 >> Watermelon(翻译)
  详细解决方案

Watermelon(翻译)

热度:52   发布时间:2023-12-05 14:34:10.0

2022.1.25

题目网址:

https://acs.jxnu.edu.cn/problem/CF4A

原题:

Watermelon

 1000ms  65536K

描述:

One hot summer day Peter 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.

Peter 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.

输入:

The first (and the only) input line contains integer number w (1?≤?w?≤?100) — the weight of the watermelon bought by the boys.

输出:

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.

样例输入:

8

样例输出:

YES

注释:

For example, the boys can divide the watermelon into two parts of 2 and 6 kilos respectively (another variant — two parts of 4 and 4 kilos).

翻译:

描述:

在一个炎热的夏天彼得和他的朋友比利决定去买一个西瓜。他们选了在他们看来这个最大最成熟的西瓜。在称完西瓜的重量之后,天平显示这个西瓜重w千克。他们跑回家,十分口渴,决定分这个西瓜,然而他们遇到了一个难题。

彼得和比利都很喜欢偶数,这就是为什么他们要这样把西瓜分成两份,每份都是偶数千克的重量,同时不要求每一份都是相等的。两个男孩非常累,他们想要尽可能块地开始他们的这一餐,那就是为什么你应该帮助他们并找到,是否他们能够以他们想要的方式分到西瓜。当然,他们每个人都应该得到一个整数重量的一部分西瓜。

输入:

第一行(也是唯一的一行)输入包括整数w(1<=w<=100)---男孩们所买的西瓜的重量。

输出:

打印YES,如果男孩们能够把西瓜分成两份,并且每个人拿到的都是偶数重量的一份;如果这种情况不存在,那么打印NO。

注释:

例如,这两个男孩能够分别把西瓜分成2千克和6千克的两份(另一种是一份4千克和一份4千克)。