Problem:


Score : 200 points

Problem Statement

There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs.

Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.

Constraints

1 \leq X \leq 100

1 \leq Y \leq 100

All values in input are integers.

Input

Input is given from Standard Input in the following format:

X Y

Output

If there is a combination of numbers of cranes and turtles in which the statement is correct, print Yes; otherwise, print No.

Sample Input 1

3 8

Sample Output 1

Yes

The statement "there are 3 animals in total in the garden, and they have 8 legs in total" is correct if there are two cranes and one turtle. Thus, there is a combination of numbers of cranes and turtles in which the statement is correct.

Sample Input 2

2 100

Sample Output 2

No

There is no combination of numbers of cranes and turtles in which this statement is correct.

Sample Input 3

1 2

Sample Output 3

Yes

We also consider the case in which there are only cranes or only turtles.



Sample input:
3 8


Sample output:
Yes

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())
if 2 * X > Y:
    ret = 'No'
else:
    if (Y - 2 * X) % 2 == 1:
        ret = 'No'
    else:
        if (Y - 2 * X) // 2 < X:
            ret = 'Yes'
        else:
            ret = 'No'
print(ret)

Submission status: Wrong Answer

Solution code:
def main():
    from builtins import int, map, list, print
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = (lambda: (sys.stdin.readline()).rstrip())
    input_list = (lambda: input().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

    X, Y = input_number_list()
    if X > 51:
        print("No")
    elif Y < 2:
        print("No")
    else:
        print(['No', 'Yes'][2*X <= Y <= 4*X])


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
c = (4 * x - y) / 2
if c.is_integer() and c >= 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())

q=(4*x-y)%2
turu=(4*x-y)/2

if q==0 and turu>=0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

if Y % 2 == 0:
    if 4 * X > Y:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x, y = list(map(int, input().split()))

if x * 4 == y:
    print('Yes')
    quit()

for i in range(x):
    zzz = y - i * 4
    if zzz // (x - i) == 2:
        print('Yes')
        quit()

print('No')

Submission status: Wrong Answer

Solution code:
N = input().split()
X = int(N[0])
Y = int(N[1])
Z = Y - 2 * X
if 0 <= Z / 2 <= X:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x,y = map(int, input().split())

crain = (4*x-y)/2

if (crain.is_integer() and crain > 0) or y == 4 or y ==2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

flg = 0
for i in range(x):
    if y % 2 == 0 and i == x:
        flg = 1
    for j in range(x - i):
        a = i * 2 + j * 4
        if a == y:
            flg = 1

if flg == 0:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

#turu = t
#kame = x - t
turu = 0
kame = 0
flag = 0
for t in range(100):
    if t * 2 + (x - t) * 4 == y:
        turu = t
        kame = x - t
        flag = 1
        break
    else:
        pass

if flag == 1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
ans = False

if X == 1 and Y == 2 or Y == 4:
    ans = True

for x in range(X):
    crane = x
    turtle = X - x
    if Y == 2*crane + 4*turtle:
        ans = True
        break

if ans == True:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

for a in range(100):
    a = a + 1
    b = x - a
    if 2 * a + 4 * b == y:
        print('Yes')
        break
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
if y<=x:
    print("No")
else:
    t = (y>>1)-x
    if(t > x):
        print("No")
    else:
        print("Yes")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
a = 0
for i in range(x+1):
	for j in range(x+1-i):
		cnt = i*2 + j*4
		if cnt==y:
			a = 1
			break
	if a == 1:
		break
if a==0:
	print('No')
else:
	print('Yes')

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

for i in range(x+1):
    for j in range(x+1):
        if 2*i + 4*j == y:
            print('Yes')
            exit()
print('No')

Submission status: Wrong Answer

Solution code:

x,y = list(map(int, input().split()))
tmp = y%2
count = 0
while tmp == 0:
    y /= 2
    tmp = y%2
#    print(y)
    count += 1
if y ==1 and count >= x:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
animals, legs = input().split()
animals = int(animals)
legs = int(legs)

for i in range(0,animals+1):
  print(animals)
  if ((i * 2) + ((animals - i) * 4)) == legs:
    result = True
    break
  result = False

if result:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())

for i in range(X):
    for j in range(100+1):
        if i + j > X:
            break
        if (i*2 + j*4) == Y:
            print('Yes')
            exit()

print('No')

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())
crain = (4 * X - Y) / 2
if crain.is_integer() and crain > 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x, y = [int(i) for i in input().split()]
i = 0
ans = "No"
while i < x:
    if 2 * (x + i) == y:
        ans = "Yes"
        break
    else:
        i += 1

print(ans)

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())
count='No'
for i in range(X):
    for j in range(X-i):
        if 2*i+4*j==Y:
            count='Yes'
            
print(count)

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())

flag=False

for a in range(0,101):
    b=X-a
    if (2*a + 4*b==Y):
        flag=True
        break

if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
X,Y=[int(x) for x in input().rstrip().split()]
y=float((Y-2*X)//2)
x=float(X-y)

if x.is_integer() and y.is_integer():
  if 0<=x and 0<=y:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

v = -Y + 4 * X
# print('v', v)
if v % 2 != 0:
    print('No')
    exit()

if v < 0:
    print('No')
    exit()

print('Yes')

# a: turu, b: kame
# a * 2 + b * 4 = Y
# a + b = X

# b = X - a
# a * 2 + (X - a) * 4 = Y
# 4 * X - 2 * a = Y を満たす a があるか
# a = (- Y + 4 * X) / 2

Submission status: Wrong Answer

Solution code:
x,y = map(int, input().split())

for a in range(1, x+1):
    if 4*x - 2*a == y:
        print("Yes")
        exit()

print("No")

Submission status: Wrong Answer

Solution code:
import numpy as np


def main(X, Y):
    if 2*X <= Y and 4*X >= Y:
        return "YES"
    return "NO"


X, Y = map(int, input().split())
print(main(X, Y))

Submission status: Wrong Answer

Solution code:
x,y=map(int, input().split())
for turu in range(x):
  kame=x-turu
  asi=kame*4+turu*2
  if asi == y:
    print('Yes')
    exit()
print('No')

Submission status: Wrong Answer

Solution code:
s = input()
s = s.split(' ')

X = int(s[0])
Y = int(s[1])

if (X * 4 >= Y) and (((Y - X * 2) % 2) == 0):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
total_num, reg_total = map(int, input().split())
if reg_total % 2 != 0:
    print('No')

if total_num*2 <= reg_total <= total_num * 4:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
def main():
    #n = int(input())
    #x = list(map( int, input().split()))
    x,y = map( int, input().split())
    turuka = (4*x-y)/2
    if turuka % 1 == 0 and turuka >= 0:
        print("Yes")
    else:
        print("No") 
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())

if (Y-2*X)%2==0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
if y-2*x >= 0 and 4*x - y >=0:
	print('Yes')
else:
	print('No')

Submission status: Wrong Answer

Solution code:
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    X, Y = map(int, input().split())

    d, m = divmod((X * 4 - Y), 2)
    if d >= 0 and not m:
        print('Yes')
    else:
        print('No')


main()

Submission status: Wrong Answer

Solution code:

X, Y = map(int, input().split())

if Y % 2 == 1 and X > Y:
    print('No')
    
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())

a = (Y - 2 * X ) / 2
if a > 0 and X - a > 0 and 2*X - 2*a == Y - 4*a:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np
import math
from collections import deque 
from functools import reduce

# input = sys.stdin.readline

x, y = map(int, input().split())

x2 = y // 2
xe = y // 4

if (x <= x2 and x >= xe):
    if (x % 2 == 0):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys

x, y = map(int, input().split())

for i in range(1, x+1):
    if (i * 2 + (x - i) * 4 == y):
        print("Yes")
        sys.exit()

print("No")

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
import sys
if x == 1 and y == 2:
    print('Yes')
elif x == 1 and y == 4:
    print('Yes')
else:
    for i in range(1,x):
        tmp = i*2+(4*(x-i))
        if tmp == y:
            print('Yes')
            sys.exit()
    print('No')

Submission status: Wrong Answer

Solution code:
from numpy.linalg import solve

x, y = map(int, input().split())
left = [[1, 1],
        [2, 4]]

right = [x, y]

a = solve(left, right)
if a[0].is_integer() is True and a[1].is_integer() is True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
from sys import stdin

x, y = [int(x) for x in stdin.readline().rstrip().split()]


if y < 2*x and 4*x < y:
    print('No')

if (y+4*x) % 2 == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import io,sys
sys.setrecursionlimit(10**6)


def main():
    X,Y = map(int,sys.stdin.readline().rstrip().split())

    y = (Y-2*X)/2
    x = X-y

    if y>=0 and y == int(y) and x >= 0:
        print("YES")
    else:
        print("NO")
main()

Submission status: Wrong Answer

Solution code:
xy = list(map(int, input().split()))

if 4*xy[0]-xy[1]<0 or -2*xy[0]+xy[1]<0:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
xy = list(map(int, input().split()))
x = xy[0]
y = xy[1]

can = False
for i in range(x+1):
    for j in range(x-i+1):
        if 2*i+4*j==y:
            can = True
            break
    else:
        continue
    break

if can:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
X,Y=map(int, input().split())
if(Y%2==1):
  print("NO")
  exit()
if(2*X-Y//2<0):
  print("NO")
if(Y//2-X<0):
  print("NO")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

X,Y=map(int,input().split())

ans="No"
for i in range(101):
    j=X-i
    if i*2 + j*4 == Y: ans="Yes"

print(ans)

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

D = 4 * X - Y
if D % 2 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N, M = map(int,input().split())
crain = (4 * N - M) / 2
if crain.is_integer() and crain > 0:
  print("Yes")

else:
  print("No")

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())

if 4*x - y < 0:
    print("NO")
elif  (y - x*2)%2 == 0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce


def input(): return sys.stdin.readline().strip()


def INT(): return int(input())


def MAP(): return map(int, input().split())


def LIST(): return list(map(int, input().split()))


def ZIP(n): return zip(*(MAP() for _ in range(n)))


sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
    X, Y = MAP()
    if Y >= 2*X and (Y-2*X)%2 == 0:
        if X - (Y-2*X)/2 > 0:
            print("Yes")
            exit()

    print("No")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
numbers = [int(i) for i in input().split()]
x=1
for i in range (0, numbers[0]):
    x *= 4
if x>=numbers[1] :
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n, m = map(int, input().split())

for i in range(1, n+1):
    f = 2 * i + 4 * (n - i)
    if f == m:
        print('Yes')
        break
    
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())


A = 2 * X - (Y / 2)

if A.is_integer() and (A >= 0):
    print('Yes')

else:
    print('No')

Submission status: Wrong Answer

Solution code:
L = [int(i) for i in input().split()]
flag=0
for i in range(L[0]):
    if L[1]-i*4-(L[0]-i)*2==0:
        print("Yes")
        flag=1
        break

if flag==0:
    print("No")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
if (4*x-y) > 0 and (4*x-y) % 2 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = 10**20
def I(): return int(input())
def F(): return float(input())
def S(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()

def resolve():
    X, Y = LI()

    ans = 'No'
    for i in range(X):
        if i*2 + (X-i)*4 == Y:
            ans = 'Yes'
            break

    print(ans)

if __name__ == '__main__':
    resolve()

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
c = 2
t = 4
if y%2 != 0:
    print("No")
else:
    while x != 0:
        if y%2 == 0:
            y -= c
            x -= 1
            continue
        if y%4 == 0:
            y -= t
            x -= 1
            continue
    if y == 0:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

max_leg = x * 4

if y > max_leg or y % 2 != 0:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

for i in range(X):
    i += 1
    if 2 * i + 4 * (X - i) == Y:
        print('Yes')
        exit()
print('No')

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
c = (4 * x - y) / 2
if c.is_integer() and c >= 0:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

if (4 * X - Y)  % 2 == 0:
        tsuru = (4 * X - Y)  // 2
        kame = X - tsuru
        if kame * 4 + tsuru * 2 == Y:
                print("Yes")
                exit()
        else:
                print("No")
                exit()
else:
        print("No")
        exit()

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

turtle = (4 * x - y) // 2
crane = y - turtle
if (4 * x - y) % 2 == 0 and crane >= 0 and turtle >= 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
i = 0

while(1):
    if i * 2 + (x - i) * 4 == y:
        print("Yes")
        break    
    if i > x:
        print("No")
        break
    i += 1

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

for tsuru in range(X+1):
    for kame in range(X-tsuru+1):
        if tsuru*2+kame*4 == Y:
            print("Yes")
            exit()
print("No")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

tmp = 4 * x - y
f = 0
if tmp % 2 == 0 and tmp >= 0:
    crane = tmp % 2
    turtle = x - crane
    if x >= 0:
        f = 1
    else:
        pass
else:
    pass

if f == 1:
    print('Yes')
else: 
    print('No')

Submission status: Wrong Answer

Solution code:
x,y=map(int, input().split())
a="No"
for i in range(x):
    if y==x*4-i*2:
        a="Yes"
        break
print(a)

Submission status: Wrong Answer

Solution code:
print("YNeos"[eval("2*"+input().replace(" ","-"))%2 > 0::2])

Submission status: Wrong Answer

Solution code:
x,y=map(int, input().split())

z = (y - 2*x)
if (y - 2*x)%2 == 0 and z <= x and z >= 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())
f = False

for i in range(1,101):
  for j in range(1,101):
    if i+j==X and 2*i+4*j==Y:
      f = True

if f:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

tsuru = (4 * X - Y) / 2

if tsuru.is_integer() and tsuru > 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())
if (4*X - Y) >= 0 and (4*X- Y)%2 == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

j = y/2 - x
i = x - y/2

if (j == abs(int(j))) and (i == abs(int(i))):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
X, Y = map(int,input().split())

if Y % 2 == 0 and Y // 2 >= X >= Y // 4 :
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
animal, leg = map(int, input().split())

answer = 'No'

for i in range(1, animal+1):
    temp = 2 * i + 4 * (animal-i)
    if temp == leg:
        answer = 'YES'
        break

print(answer)

Submission status: Wrong Answer

Solution code:
x , y = map(int , input().split())

for i in range(x+1):
    for j in range(x+1):
        if (2*i) + (4*j) == y:
            print("Yes")
            exit()

print("No")

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())

if 2*x <= y <= 4*x:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
# coding:utf-8


def main():
    X, Y = map(int, input().split())

    m = (Y-2*X)
    if (m >= 0 and m % 2 == 0 and X-m >= 0):
        print("Yes")
    else:
        print("NO")

    return


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
if m/4<=n<=m/2:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
XY = list(map(int, input().split()))
 
if 2 * XY[0] - XY[1] / 2 >= 1 and -XY[0] + XY[1] / 2 >= 1:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
for i in range(x+1):
    if (x-i)*4 + i*2 == y:
        print("YES")
        exit()

print('NO')

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())

if b >= a*2 and a*4 >= b:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x, y = map(int,input().split())

kame = (y - x*2)/2
if (kame > x or kame < 0) and y%2 == 0:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
for i in range(1,x+1):
    kame=x-i
    if kame*4+i*2==y:
        print('Yes')
        exit()
print('No')

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

flg = 0
for i in range(x):
    if y % 2 == 0:
        flg = 1
    for j in range(x - i):
        a = i * 2 + j * 4
        if a == y:
            flg = 1

if flg == 0:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
x = list(map(lambda x:int(x), input().split()))
X = x[0]
Y = x[1]

kame = (Y-X*2)//2
#print(kame)

if X-kame >= 0 and Y - kame*4 == (X-kame)*2:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
# 別変数の整数複数個
X, Y = [int(x) for x in input().strip().split(" ")]

turtles = (Y - X - X) // 2
if 0 <= turtles <= X:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
(x, y) = [int(s) for s in input().split()]


ans = 'NO'
if 2 * x <= y <= 4 * x and y % 2 == 0:
    ans = 'YES'

print(ans)

Submission status: Wrong Answer

Solution code:
X, Y = map(int , input().split())
X2 = X * 2
X3 = X * 4
if(X2 <= Y and Y <= X3):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys
x, y = map(int, input().split())
t = x * 2
for i in range(x):
    if t == y:
        print("Yes")
        sys.exit()
    else:
        t += 2
print("No")

Submission status: Wrong Answer

Solution code:
def s(a):
	res = 0
	for v in a:
		res += v
	return res

x, y =map(int, input().split())
a = [2]*x

for i in range(x):
	if s(a) == y:
		print("Yes")
		exit()
	a[i] = 4

print("No")

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())

for i in range(1,101):
    if 2*i + 4*(x-i) == y:
        print("Yes")
        exit()
else:
    print("No")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

X, Y = [int(s) for s in input().split()]

if Y % 2 != 0:
    print('No')

low = Y // 4 + (Y % 4 != 0)
high = Y // 2

if low <= X <= high:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())

# print(y-x*2)
df = y-x*2
if df <= x:
    if df%2:
        print('No')
    else:
        print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
if int((y-2*x)//2)==(y-2*x)//2 and int((4*x-y)//2)==(4*x-y)//2 and (y-2*x)//2>0 and (4*x-y)//2>0:
    print('Yes')
elif ((y-2*x)//2==0 and (4*x-y)//2!=0) or ((y-2*x)//2==0 and (4*x-y)//2!=0):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys


def ip():
    return sys.stdin.readline()


def ipl():
    return sys.stdin.readline().split()


def solve():
    a, b = map(int, ipl())
    t = b / 2 - a
    c = a - t
    if t >= 0 and c >= 0 and t + c == a:
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
if (y-2*x)//2<=x and (y-2*x)%2==0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())

if Y <= X*4 and Y%2 ==0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x, y = list(map(int, input().split()))

crain = (4 * x - y) / 2

if crain > 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys

X, Y = map(int, input().split())

for i in range(X):
    for j in range(X,1,-1):
        if Y == 4*i + 2*j:
            print("YES")
            sys.exit()

print("NO")

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
result='No'
if x*4>=x:
    for i in range(x):
        if i*4+(x-i)*2==y:
            result='Yes'
            break
print(result)

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())

for i in range(X+1):
    for j in range(100):
        if i + j > X:
            break
        if (i*2 + j*4) == Y:
            print('Yes')
            exit()

print('No')

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
a = y//2-x
b = x-a
if(a<0 or b<0):
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
x,y = map(int, raw_input().split(' '))


"""
a + b = x
2a + 4b = y

a = x-b
2x- 2b + 4b = y

a = x-b
2b = y  - 2x
"""
def f(x,y):
  
	if (y - 2*x) < 0 or (y - 2*x) %2 != 0: return False
	b = y - 2*x
	a = x - b
	if a < 0: return False
	return True
  
print 'Yes' if f(x,y) else 'No'

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

def func(x,y):
    if y % 2 == 1:
        return False
    if 4*x < y:
        return False
    else:
        return True
    
if func(x,y):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

flag = False
for turu in range(101):
    for kame in range(101):
        if turu + kame == x and 2 * turu + 4 * kame == y:
            flag = True
            break
print(flag)

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
a=0
c=y
while a<30:
    if c==2*(x-a):
        print("Yes")
        break
    c=c-4
    a+=1

if a==30:
    print('No')

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

tf = False
if X == 1:
    if Y == 2 or Y == 4:
        tf = True
else:
    for i in range(1, X + 1):
        for j in range(X - i, 0, - 1):
            if i * 2 + j * 4 == Y:
                tf = True

if tf:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x, y = map(lambda x: int(x), input().split(' '))

if(x * 2 <= y and x * 4 >= y and y % 2 == 0):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
X, Y= map(int,input().split())

if (4*X-Y) <= 0:
    print('No')
else:
    if (4*X-Y)%2 == 0:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
X, Y = [int(x) for x in input().split()]

Kame = (Y - (2*X)) // 2

ans = 'No'
if 0 <= Kame <= X:
        ans = 'Yes'

print(ans)

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

ans = "No"
for i in range(1,x+1):
    for j in range(x+1-i):
        if 2*i + 4*j == y:
            ans = "Yes"
            break

print(ans)

Submission status: Wrong Answer

Solution code:
X, Y = [int(x) for x in input().split()]
t = Y - 2 * X
if (0 <= t <= 2*X):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:

x, y = (int(x) for x in input().split())

ans = ''

if (4 * x - y) / 2 > 0 :
    ans = 'Yes'
else :
    ans = 'No'

print(ans)

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

flag = 0
for tsuru in range(x+1):
    for kame in range(x+1 - tsuru):
        if flag == 0:
            if tsuru*2 + kame*4 == y:
                flag = 1
                print("Yes")
if flag == 0:
    print("No")

Submission status: Wrong Answer

Solution code:
X , Y = map(int, input().split())
val = X * 2
for i in range(X + 1):
    val += i * 2
    if val == Y:
        print('Yes')
        break
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
if x == 1:
    if y == 2 or y == 4:
        print('Yes')
    else:
        for i in range(1, x+1):
            if i*4 + (x-i)*2 == y:
                print('Yes')
                break
            else:
                print('No')
                break

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

if Y % 2 != 0:
    print('No')
elif 4 * X < Y:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

i=1
flag = 0
while(i <= x):
    if(i*2 + (x-i)*4) == y:
        flag = 1
        break
    i+=1
if flag == 1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
for i in range(1,x+1):
  if 2*i+4*(x-i)==y:
    ans="Yes"
  else:
    ans="No"
print(ans)

Submission status: Wrong Answer

Solution code:
x,y = map(int, input().split())
ans=0
for i in range(x):
  if (y-x*2)/2<=x:
    ans=1
if ans:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
x,y=map(int,input().split())

if y%2==0 and y/x<4:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys

X, Y = map(int, input().split())

for i in range(1, X + 1):
    if i * 2 + (X - i) * 4 == Y:
        print("Yes")
        sys.exit()

print("No")

Submission status: Wrong Answer

Solution code:
#-*-coding:utf-8-*-

import sys

def main():
    x,y = map(int,input().split())

    for i in range(x+1):
        for j in range(x+1-i):
            if i*2+j*4==y:
                print("Yes")
                sys.exit()
            elif i*4+j*2==y:
                print("Yes")
                sys.exit()
    print("No")

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
exist_flg = False
for kame in range(a+1):
  tsuru = a - kame
  if (kame*4+tsuru*2)==b:
    exist_flg = True
    break
if exist_flg:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
import sys

x, y = map(int, input().split())

for c in range(1, 100):
  if 2*c + 4*(x-c) == y:
    print('Yes')
    sys.exit()

print('No')

Submission status: Wrong Answer

Solution code:
x, y = list(map(int, input().split()))

if y % 2 != 0:
    print('No')
    exit(0)

a = x * 4

if a < y:
    print('No')
    exit(0)
    
if x == y:
    print('No')
    exit(0)
    
print('Yes')

Submission status: Wrong Answer

Solution code:
X, Y = map(int,input().split())

a = 2 * X - Y // 2
b = Y // 2 -X

if (a >= 0) & (b >= 0):
    if (a == 0) & (b == 0):
        print('No') 
    else:
        print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x,y = (int(x) for x in input().split())
for i in range(x):
  total = 2 * i + 4 * (x - i)
  if total == y:
    print('Yes')
    break
else:
  print('No')

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
result='No'
for i in range(1,100):
    for d in range(1,100):
        if i+d==x:
            if i*2+d*4==y or i*4+d*2==y:
                result='Yes'
                break
print(result)

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())


if Y%2 == 0 and 2*X >= Y:
  print('Yes')
elif Y%2 == 0 and 4*X >= Y :
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
X, Y = map(int, input().split())

turtle_num = (Y - 2 * X) / 2
crain_num = X - turtle_num
ans = turtle_num * 4 + crain_num * 2
if ans % 1 == 0 and int(ans) == Y and turtle_num >= 0 and crain_num >= 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
i = Y-2*X
flag = i%2==0 and i//2 < X and i>=0
ans = 'Yes' if flag else 'No'
print(ans)

Submission status: Wrong Answer

Solution code:
import sys

x, y = map(int, input().split())

#鶴a匹、亀x-a匹とする
for a in range(1, x + 1):
  if y == 4 * x - 2 * a:
    print('Yes')
    sys.exit()
    
print('No')