EVENLOVE - Editorial

PROBLEM LINK:

Practice
Div-2 Contest

Author: Riddhish Lichade

DIFFICULTY:

CAKEWALK

PREREQUISITES:

Math

PROBLEM:

Cats want to divide the cheese into 2 parts such that both the parts should be even. If they can divide it then print YES else print NO.

EXPLANATION:

We have to divide the cheese into two parts where both the parts should be even. This is possible only if the total weight is even as one cannot divide an odd number into 2 even parts.
Also, if the total weight is less than 4kg then it’s not possible to divide into two equal even parts as 2 is the only even number less than 4 and it can’t be divided into two even parts.

SOLUTIONS:

Setter's Solution
from sys import stdin
for _ in range(int(stdin.readline())):
    n=int(input())
    if(n>=4 and n%2==0):
        print("YES")
        continue
    print("NO")