Skip to main content
Back to problems
Codeforces
Easy
Math
Watermelon

Decide whether a watermelon weight can be split into two positive even parts.

Acceptance 0%
Problem Statement

Watermelon

You are given a positive integer ww — the weight of a watermelon.

You want to split it into two positive parts such that:

  • both parts have even weight,
  • the sum of the two parts is exactly ww.

Determine whether this is possible.

Return YES if such a split exists, otherwise return NO.

A split into two parts means both parts must be strictly greater than $0$.

Input Format

A single integer ww.

Output Format

Print YES if ww can be split into two positive even integers, otherwise print NO.

Constraints

  • 1w1001 \le w \le 100
Examples
Sample cases returned by the problem API.

Example 1

Input

8

Output

YES

Explanation

It can be split as 2 and 6, and both parts are positive even numbers.

Example 2

Input

1

Output

NO

Explanation

It is impossible to split 1 into two positive even parts.

Show 1 more example

Example 3

Input

3

Output

NO

Explanation

An odd total cannot be written as a sum of two even positive integers.

Premium problem context

Unlock deeper context for this problem

Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.

Guided hints
Editorial and discussion links
Concept map and variants
Sign in to unlock
Track your progress
Sign in to bookmark this problem, save notes, and manage its revision plan.