source_code:
n = Integer(gets())
if n.odd? then
    puts "NO"
    exit 0
end

a = b = n/2

if a.even? && b.even? then
    puts "YES"
    exit 0
end
a--
b++
if a <= 0:
    puts "NO"
    exit 0
end
if a.even? && b.even? then
    puts "YES"
    exit 0
end
puts "NO"

lang_cluster: Ruby


source_code:
    w = gets.to_i
    (w%2 == 0 and w >= 2)? puts 'YES' : puts 'NO'


source_code:
w = gets.to_i
(w%2 == 0 and w >= 2) puts 'YES' : puts 'NO'


source_code: puts gets[/^.[A-Z]*$] ? $_.swapcase : $_


source_code:
inp = gets
if inp.index('0000000') || inp.index('1111111'))
  puts "YES"
else
  puts "NO"
end


source_code: (1+gets.to_i).upto(10000)) { |i| if i.to_s.split(//).uniq.length == 4; puts i; break; end; }


source_code:
k=gets.chomp.to_i
l=gets.chomp.to_i
m=gets.chomp.to_i
n=gets.chomp.to_i
d=gets.chomp.to_i
ret=0
1.upto(d){|i| if %k==0 || i%l==0 || i%m==0 || i%n==0 || i%d==0 then ret+=1 end}
print(ret,"\n")


source_code:
bottle = gets.to_i - 1
people = w%[Sheldon Leonard Penny Rajesh Howard]
p_num = people.length

until bottle <= p_num do
 bottle = (bottle - p_num)/2
end

puts people[n]


source_code: gets.strip.scan(/[47]/).size.to_s =~ /^[47]*$/ ? puts "YES" : puts "NO"


source_code:
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <cmath>
#include <iostream>
#include <cstdlib>
#include <cctype>
#include <stack>

using namespace std;

#define INIT(range, val) memset(range, val, sizeof(range))
#define inject(x) { cerr << "Fuction: " << __FUNCTION__ << ", Line: " << __LINE__ << ", " << #x << ": " << (x) << endl; }
#define mp make_pair
#define pb push_back

inline void __CIN__() { ios::sync_with_stdio(false); cin.tie(0); }

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;

char buf;
inline int xint() { while (buf = getchar(), buf < '0' || buf > '9'); int x = buf - '0'; for (; buf = getchar(), buf >= '0' && buf <= '9'; x = x * 10 + buf - '0'); return x; }
inline ll xll() { while (buf = getchar(), buf < '0' || buf > '9'); ll x = buf - '0'; for (; buf = getchar(), buf >= '0' && buf <= '9'; x = x * 10 + buf - '0'); return x; }
inline string xstring() { while (buf = getchar(), buf == ' ' || buf == '\n'); string x = ""; for (x += buf; buf = getchar(), buf != ' ' && buf != '\n'; x += buf); return x; }

int main() {
	return 0;
}


source_code:
arr = gets.split(' ')
k = arr[0].to_i
n = arr[1].to_i
w = arr[2].to_i
total_sum = w*(k+w*k)/2
needed = total_sum - n
needed>0 ? puts needed : puts 0


source_code:
p = ('H','Q','+','9').to_a
s = gets.to_s.split(//)
s = s & p
if s.size>0
    print 'YES'
else
    print 'NO'
end


source_code:
#!/usr/bin/ruby
hodnoty = "6789TJQKA"
trumf = gets.chop.to_s
//puts trumf
cards = gets.chop
//puts cards
c1h = cards[0].chr
c1b = cards[1].chr
c2h = cards[3].chr
c2b = cards[4].chr
if c1b == c2b
	then
		if hodnoty.index(c1h) > hodnoty.index(c2h)
			then
				puts "YES"
			else
				puts "NO"
			end
	end
if c1b != c2b
	then
		if c1b == trumf
			then
				puts "YES"
			else
				puts "NO"
			end
	end


source_code:
def solve(n,k)
        big=n;small=k
        a=0
        while big!=1||small!=1
                t=big/small
                if big%small==0 then t-=1 end
                if t==0 then return 99999999 end
                a+=t
                big-=t*small
                if big<small then
                        big,small=small,big
                end
                if small==0 then return 9999999 end
        end
        a
end
# 最後の数字を家庭する
n=gets.to_i
ans=99999999

for i in 1..n
        if ans.gcd(i)!=1 then next end
        ans=[ans,solve(n,i)].min
        # p [n,i,solve(n,i)]
end
p ans

[nomeaning@ne


source_code:
# f = File.open('input.txt', 'r')
f = STDIN

def get_max_points(points:, minutes:)
  [3 * points / 10, points - points / 250 * minutes].max
end

while str = f.gets
  a, b, c, d = str.chomp.split.map &:to_i
  misha_points = get_max_points points: a, minutes: c
  vasya_points = get_max_points points: b, minutes: d

  if misha_points > vasya_points
    puts 'Misha'
  elsif misha_points == vasya_points
    puts 'Tie'
  else
    puts 'Vasya'
  end
end


source_code:
line = STDIN.gets
A = line.split(" ");
s = A[0].length
p = A[0].to_i
d = A[1].to_i
if( d == 0 )
    puts p
    exit(0)
end
res = 0
mod = 10
now = 9
s.times { |i|
  q = p
  r = q
  if( r >= now && d >= (r-now)%mod && q >= (r-now)%mod )
    res = q-(r-now)%mod
  end
  mod *= 10
  now *= 10
  now += 9
}
if( res == 0 ) puts p-1
else print res,"\n"
end


source_code:
sum = gets.chomp.to_i
sum<0 ?
    {sum = -sum
    a = sum/10
    b = (sum/100)*10 + sum%10
    acc = case
        when a<=b && a<sum then sum = -a
        when b<a && b<sum then sum = -b
    end}

puts sum


source_code:
m = Integer(gets)
input = gets.chomp
numbers = input.split
nums = Array.new
for i in 0...m
	nums[i] = Integer(numbers[i])
end
input2 = gets.chomp
numbers2 = input2.split
x = Integer(numbers2[0])
y = Integer(numbers2[1])

c = 0
for i in 0...m
	c += nums[i]
en
answer = 0
for i in 0...m
	d = 0
	for j in i...m
		d += nums[j]
	end
	if d >= x && d < y && c - d >= x && c - d < y
		answer = i + 1
		break
	end
end
puts answer


source_code:
a, b, s = gets.chomp.split.map &:to_i
sum = a + b
puts if s >= sum && (s - sum) % 2 == 0 then
  "Yes"
else
  "No"
end


source_code:
#include <cstdio>

const int MAXN = 128;

int main() {
	int r, c;
	char s[MAXN][MAXN];

	scanf("%d%d", &r, &c);
	for (int i = 0; i < r; ++i) {
		scanf("%s", s[i]);
	}
	for (int i = 0; i < r; ++i) {
		for (int j = 0; j < c; ++j) {
			bool flag = true;
			for (int k = 0; flag && k < r; ++k) {
				flag &= k == i || s[k][j] != s[i][j];
			}
			for (int k = 0; flag && k < c; ++k) {
				flag &= k == j || s[i][k] != s[i][j];
			}
			if (flag) {
				putchar(s[i][j]);
			}
		}
	}

	return 0;
}


source_code:
n,m = gets.strip.split.map(&:to_i)
target = []
tmp = "."*m
grid = []
n.times do
  grid << gets.strip
  target << tmp.dup
end

1.upto(n-2).each do |i|
  1.upto(m-2).each do |j|
    next if grid[i-1][j-1] == '.'
    next if grid[i-1][j-0] == '.'
    next if grid[i-1][j+1] == '.'
    next if grid[i-0][j-1] == '.'
    next if grid[i-0][j+1] == '.'
    next if grid[i+1][j-1] == '.'
    next if grid[i+1][j-0] == '.'
    next if grid[i+1][j+1] == '.'

    target[i-1][j-1] = '#'
    target[i-1][j-0] = '#'
    target[i-1][j+1] = '#'
    target[i-0][j-1] = '#'
    target[i-0][j+1] = '#'
    target[i+1][j-1] = '#'
    target[i+1][j-0] = '#'
    target[i+1][j+1] = '#'
  end
end

poossible = true
0.upto(n-1).each do |i|
  if grid[i] != target[i]
    poossible = false
    break
  end
end

puts (poossible ? "YES" : "NO")


source_code:
x1, y1, x2, y2 = gets.chomp.split.map &:to_i
x, y = gets.chomp.split.map &:to_i

m = (x1.abs - x2.abs) / x
n = (y1.abs - y2.abs) / y
if m == 0
    if n.even?
        puts "YES"
    else
        puts "NO"
    end
else
    if m == n
        puts "YES"
    else
        puts "NO"
    end
end


source_code:
#! ruby
# Try Codeforces
# author: Leonardone @ NEETSDKASU
############################################################
def gs() gets.chomp end
def gi() gets.to_i end
def gss() gs.split end
def gis() gss.map(&:to_i) end
def nmapf(n,f) n.times.map{ __send__ f } end
def ngs(n) nmapf n,:gs end
def ngi(n) nmapf n,:gi end
def ngss(n) nmapf n,:gss end
def ngis(n) nmapf n,:gis end
def arr2d(h,w,v=0) h.times.map{[v] * w} end
def for2p(hr,wr,&pr) hr.each{|i|wr.each{|j| yield(i,j)}} end
def nsum(n) n * (n + 1) / 2 end
def vcount(d,r=Hash.new(0)) d.inject(r){|r,e| r[e]+=1;r} end
############################################################

n = gi

if n == 0
    puts "0 0"
    exit
end

m = n - 1

d = 0

k = 9 + 4 * 3 * n
d = (- 3 + (k ** 0.5)) / 6
d = d.floor

f = d * (d - 1) * 3

case
when (n - f) <= d
    e = n - f
    x = d * 2 - e
    y = e * 2
when (n - f) <= 2 * d
    e = (n - f) - d
    x = d - e * 2
    y = d * 2
when (n - f) <= 3 * d
    e = (n - f) - d * 2
    x = -d - e
    y = d * 2 - e * 2
when (n - f) <= 4 * d
    e = (n - f) - d * 3
    x = - d * 2 + e
    y = -e * 2
when (n - f) <= 5 * d
    e = (n - f) - d * 4
    x = -d + 2 * e
    y = -d * 2
else
    e = (n - f) - d * 5
    x = d + e
    y = -d * 2 + e * 2
end

puts "%d %d" % [x, y]


source_code:
#!/usr/bin/ruby
n=gets.to_i
r=0
d=1
while r<=n
	r=r*10+9
	d*=10
end
d/=10
r-=d while r>n
p [n,r].max_by{|e|[e.to_s.chars.map(&:to_i).reduce(:+),e]}


source_code:
n, m, a, b = gets.split.map{|e| e.to_i }
mod = n % m
puts [mod*b, ((m-mod)%m)*a].min


source_code:
require 'set'

t = gets
(1..t.to_i).each do |ind|
    n = gets
    i = 1
    n = n.to_i
    while i*i <= n
        st = Set[]
        st << i*i
    end
    while i*i*i <= n
        st = Set[]
        st << i*i*i
    end
    puts st.size
end


source_code:
n= gets.to_i
a = gets.split("")
a.pop
a.each_index do |i|
	move = a[i]
	if move == 'L'
		k = a.index 'R'
		if k
			a[i] = 0
			a[k] = 0
		end
	end
	if move == 'R'
		k = a.index 'L'
		if k
			a[i] = 0
			a[k] = 0
		end
	end
	if move == 'U'
		k = a.index 'D'
		if k
			a[i] = 0
			a[k] = 0
		end
	end
	if move == 'D'
		k = a.index 'U'
		if k
			a[i] = 0
			a[k] = 0
		end
	end
end
count = 0
a.each do |move|
	count +=1 if move ==0
end
print(count)


source_code:
T='fedabc'
s=gets.chomp
x=T.index(s[-1])+1
s=s.to_i-1
d,r=s.divmod(4)
if r%2==1
	x+=7
end
p x+d*16


source_code:
c = gets.chomp.split(" ").map{|i| i.to_i}

a = c[0]
b = c[1]
k = c[2]

L = []

(1..b).each do |i|
    L[i] = 1
end
L[1] = 0

(2..b).each do |i|
    kq = 2*i
    if L[i] == 1
        while kq <= b do
            L[kq] = 0
            kq += i
        end
    end
end

dem = 0
P = []
max = 0

(a..b).each do |i|
  if L[i] == 1
    dem += 1
    P[dem] = i
  end
end

if dem < k
    max = -1
else
    max = b - P[dem-k+1] + 1
    if max < (P[k] - a + 1)
        max = P[k] -a + 1
    end
    j = dem - k
    (1..j).each do |i|
        if (P[i+k] - P[i]+1) > max
            max = P[i+k] - P[i]
        end
    end
end

puts max


source_code:
hs=Hash.new(0)
gets.chomp.chars.each{|e|
	hs[e]+=1
}
p hs.size


source_code:
require 'set'
class Spelling
  attr_reader(:s)
  def initialize(s)
    @s = s
  end

  def sp
    @s.split("")
  end

  def rotated
    (0..s.length).map{|i| sp.rotate(i)}
  end

  def result
    rotated.to_set
  end
end

print Spelling.new(gets.strip).result.length


source_code:
n = gets.to_i
as = gets.split.map(&:to_i)
lefted = []
(n-1).downto(0) do |i|
  a = as[i]
  lefted << a unless lefted.include?(a)
end
puts lefted.size
puts lefted.reverse.join(" ")


source_code:
gets
a=gets.split.map(&:to_i)
p a[-1]^a.max


source_code:
MOD = 10**9+7
def modpow(x,n)
  ret = 1
  while n > 0
    ret = ret*x % MOD if n&1 == 1
    x = x*x % MOD
    n >>= 1
  end
  return ret
end

n,m = gets.split.map(&:to_i)

p modpow((modpow(2,m) - 1),n)


source_code:
def calcs(x,y,ax,ay,bx,by) ((ax-x)*(by-y)-(bx-x)*(ay-y))/2.0 end

def inpf() a=gets.chomp.split(" ").map(&:to_f)end

def inps() a=gets.chomp.split(" ")end

def copy(a) Marshal.load(Marshal.dump(a)) end

def kaizyo(n)(n < 2)? 1 : (2..n).inject(:*) end

def scount(a) b=na(a.max+1);a.each{|n|b[n]+=1};return b end

def na(n=0,d=0) Array.new(n,d)end

def na2(n=0,m=0,d=0) Array.new(n){Array.new(m,d)}end

def na3(n=0,m=0,l=0,d=0) Array.new(n){Array.new(m){Array.new(l,d)}}end

def bit(n) n.to_s(2).split("").map(&:to_i) end

def inp() a=gets.chomp.split(" ").map(&:to_i)end

def k2(k,n,m)
  return 1 if k == 0
  return n if(k == 1)
  ans = 1
  if((k%2) == 0)
    ans *= k2(k/2,n,m)**2
  else
    ans *= k2(k-1,n,m)
    ans *= n
  end
  return ans % m
end
mod = 10**9+7
a,b = inp
p k2(a,k2(b,2,mod)-1,mod)


source_code:
a, b, c = gets.split.map(&:to_i)
puts c * 2 + [a, b].min * 2 + (a != b ? 1 : 0)


source_code:
a, b = gets.strip.split.map{|s|s.to_i}
if a == b
  puts 'Equal'
  exit
end
d = a * b / a.gcd(b)
fa = d / a
fb = d / b
a < b ? fa -= 1 : fb -= 1
if fa > fb
  puts 'Dasha'
elsif fa < fb
  puts 'Masha'
else
  puts 'Equal'
end


source_code:
f = gets.strip.split ''
s = gets.split.join.split ''
puts(s.any?{|x| f.any?{|y| x == y}} ? "YES" : "NO")


source_code:
def fact(x)
  fact = 1
  x.times do |el|
    fact *= (el + 1)
    #fact %= (10**9 + 7)
  end
  fact
end

def fact_mod(x)
  fact = 1
  x.times do |el|
    fact *= (el + 1)
    fact %= (10**9 + 7)
  end
  fact
end

def fc(n, k)
  return 0 if k > n
  fact(n)/(fact(n - k)) # % (10**9 + 7)
end

n, x, pos = gets.chomp.split(' ').map(&:to_i)
less = -1
greater = 0
left = 0
right = n
arr = (1..n).to_a
while left < right
  middle = (left + right) / 2
  if arr[middle] <= pos + 1
    less += 1
    left = middle + 1
  else
    greater += 1
    right = middle
  end
end
gr_count = n - x
ls_count = n - gr_count - 1
fixed = n - less - greater - 1
puts (fact(fixed) * fc(gr_count, greater) * fc(ls_count, less)) % (10**9 + 7)


source_code:
a, b, c = gets.split.map &:to_i

def solve(a,b,c)
  ar = Array.new(1000001) { 0 }
  ans = 0
  mod = 1073741824
  for i in 1..a do
    for j in 1..b do
      for k in 1..c do
        d = i*j*k
        ans += ret_div(ar, d, mod)
      end
    end
  end
  puts ans
end

def ret_div(ar, el, mod)
  return ar[el] if ar[el]>0
  j = 1
  div = 0
  while j*j<=el do
    if el%j == 0
      div+=2
    end
    j+=1

  end
  div-=1 if (j-1)*(j-1) == el
  ar[el] = div % mod
  ar[el]
end

solve a, b ,c


source_code:
n,f=gets.split.map{|e| e.to_i}

hs=Hash.new(0)
gets.chomp.chars.each{|e|
	hs[e]+=1
}

vs=hs.values
sum=0
while vs.size >1
	d=vs.shift
	vs=vs.map{|e|
		if d>=e then
			d-=e
			f-=e
			0
		else
			f-=d
			t=e-d
			d=0
			t
		end
	}.select{|e| e>0}
	vs.push(d) if d>0
end
if vs.empty? && f>=0 then
	puts "YES"
else
	puts "NO"
end


source_code:
# coding: utf-8

x, y, z = gets.split.map(&:to_i)
# x -> andrew: only green
# y -> dmitry: green and purple
# z -> michal: any type is good
a, b, c = gets.split.map(&:to_i)
# a -> green
# b -> purple
# c -> black
# happy YES unhappy NO

a -= x
if a < 0
    puts "NO"
else
    ab = a + b - y
    if ab < 0
        puts "NO"
    else
        if ab + c >= z
            puts "YES"
        else
            puts "NO"
        end
    end
end


source_code:
n=gets.chomp.to_i
s=gets.chomp

if s=='0'
  puts 0
else
  puts '1'+'0'*s.count('0')
end