problem
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.
using language : python3
num = input()
if int(num) <=2:
print("NO")
elif int(num) % 2 == 0:
print("YES")
else:
print("NO")
'알고리즘(Python,Java)' 카테고리의 다른 글
[Codeforces]A. Way Too Long Words (0) | 2019.08.18 |
---|---|
[codeforces] A. Theatre Square (0) | 2019.08.15 |
백준알고리즘 2798번: 블랙잭 (0) | 2019.08.15 |
백준알고리즘 3053번: 택시 기하학 (0) | 2019.08.11 |
백준알고리즘 4948번: 베르트랑 공준 (0) | 2019.07.16 |
#IT #먹방 #전자기기 #일상
#개발 #일상