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:
a,b = map(int,input().split())

turu = 2
kame = 4
flag =0

for x in range(a + 1):
    # print("xです{}".format(x))
    for y in range(a + 1):
        # print("yです{}".format(y))
        if  x +  y == b//2 and (x + y) <= a:
            flag += 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
max = x * 4
if y % 2 != 0:
  print('No')
elif max <= y:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
x2=y//2-x
x1=x-x2
if(x1==0 and x2==0):
    print("No")
elif(x1>=0 and x2>=0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

a = 2
b = 4

lista=[]
listb=[]

for i in range(101):
    if i %2 == 0:
        lista.append(i)

for j in range(101):
    if j % 4 == 0:
        listb.append(j)


if y == b*x:
    print('Yes')
elif y == a*x:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
x = 0
y = 0
if a * 4 < b:
    print("No")
else:
    for i in range(a):
        if x == b:
            break
        else:
            if x + 4 >= b:
                if x + 2 >= b:
                    x = x + 2
                    continue
                else:
                    x = x + 2
            else:
                x = x + 4
    if x == b:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a=(4*X-Y)/2
q=0

if a>0:
    q=1
    print("Yes")

a=(8*X-Y)/4

if q==0:
    if a>0 and a%4==0:
        print("No")
    else:
        print("Yes")

Submission status: Wrong Answer

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

turtles = (Y - 2*X) / (4 - 2)
cranes = (4*X - Y) / (4 - 2)

check_1 = int(turtles + cranes)
check_2 = turtles*4 + cranes*2

if X == check_1 and Y == check_2 and 0 <= turtles and 0 <= cranes:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())
def s(X,Y):
    for i in range(0,X+1):
        for j in range(i+1,X+2):
            if (2*i+4*j)==Y or (2*j+4*i)==Y:
                return "Yes"
    return "No"
print(s(X,Y))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

if ((a+b) == X) and ((2*a+4*b) == Y):
    print('Yes')
elif ((a+b) not in X) and ((2*a+4*b) not in Y):
    print('No')

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
Z = 0
ANS = 'No'
if Y % 2 == 0:
    while X >= 0:
        i = X*2 + Y*4
        if i == Y:
            ANS = 'Yes'
        X -= 1
        Z += 1
        
print(ANS)

Submission status: Wrong Answer

Solution code:
n = [int(i) for i in input().split()]
if n[0]*4 < n[1] or n[1]%2 == 1 or n[1] < n[0] or n[0] == n[1]:
    print("No")
elif n[0]*4 >= n[1] or n[1]%2 == 0 or n[1] > n[0] or n[0] != n[1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
x = 0
y = 0
if a * 4 < b:
    print("No")
else:
    for i in range(a):
        if x == b:
            break
        else:
            if x + 4 >= b:
                if x + 2 > b:
                    continue
                else:
                    x = x + 2
            else:
                x = x + 4
    if x == b:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
# 全ツル
if 2*X == Y:
  print('Yes')
# 全カメ
elif 4*X == Y:
  print('Yes')
# ツルカメ
# elif (4*X - Y) % 2 == 0:
for i in range(X):
  cranes = i+1
  turtles = X - cranes
  if cranes*2+turtles*4 == Y:
    print('Yes')
    break
else:
  print('No')

Submission status: Wrong Answer

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

X,Y = list(map(int, input().rstrip().split()))
#-----
crane = (4*X - Y) // 2
tortoise = (-2*X + Y) // 2

if (0 <= crane <= 100) and (0 <= tortoise <= 100):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
Z = 0
ANS = 'No'
if Y % 2 == 0:
    while X >= 0:
        i = X*2 + Y*4
        if i == Y:
            ANS = 'Yes'
        Z += 1
        X -= 1
print(ANS)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

turu = xs[0]
kame = 0
head = xs[0]

result = ""
for _ in range(head):
    if turu * 2 == xs[1]:
        result = "YES"
        break
    else:
        kame += 1
        turu -= 1
        if kame * 4 + turu * 2 == xs[1]:
            result = "YES"
            break
        else:
            result = "NO"
            
print(result)

Submission status: Wrong Answer

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

if (b-2*a)%2==0:
    if (b-2*a)<0:
      print('NO')
    elif (4*a-b)<0:
      print('NO')
    elif(4*a-b)%2==0:
      print('YES')
    else:
      print('No')
    
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 100 >= crain >= 0 :
    crain = int(crain)
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

y = (b-2*a)//2
x = a-y

if y < 0 or x < 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

turu = 1
kame = 1

#for i in range(0,25):
#    turu = i
while y % turu*2 + kame*4 == 0:
	print("Yes")
else:
    turu += 1
    turuf = turu * 2
    kamef = kame * 4
    if turuf == 50:
        kame += 1
        turu = 1
    if kamef == 26:
        print("No")

print("Yes")

Submission status: Wrong Answer

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

c = b//4
print(c)
if c > a:
    print("No")
    exit()
for i in range(0, b):
    for j in range(0, b):
        if i*2 + j*4 == b:
            print("Yes")
            exit()
    else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X,Y = (map(int, input().split()))
X2= X*2
num = 0
for i in range(X-1):
    if X2+num == Y:
        print("Yes")
        quit()
    num +=2
print("No")

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
if (b-2*a) %2==0 and b-2*a >=0 :
  print('YES')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

c = b//4
if c>a:
    print("No")
    exit()
elif a ==b//2:
    print("Yes")
    exit()
for i in range(0, b):
    for j in range(0, b):
        if i*2 + j*4 ==b:
            print("Yes")
            exit()
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
X,Y = (map(int, input().split()))
X2= X*2
num = 0
for i in range(X):
    if X2+num == Y:
        print("Yes")
        quit()
    num +=2
print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict
 
x,y = map(int,input().split())
 
for i in range(1, x+1):
    # 足の数
    f = 2 * i + 4 * (x - i)
    if f == y:
        print('No')
        sys.exit()
print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

X,Y = list(map(int, input().rstrip().split()))
#-----
crane = (4*X - Y) / 2
tortoise = (-2*X + Y) / 2

if (0 <= crane <= 100) and (0 <= tortoise <= 100):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

for i in range(a):
    if (a-i)*2+(i)*4 == b:
        print('Yes')
        break
if i>a:
    print('No')

Submission status: Wrong Answer

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

turu = 2
kame = 4
flag =0

for x in range(a + 1):
    for y in range(a + 1):
        if kame * x + turu * y == b or x + y <= a:
            flag += 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict
 
x,y = map(int,input().split())
 
for i in range(1, x+1):
    # 足の数
    f = 2 * i + 4 * (x - i)
    if f == y:
        print('No')
        sys.exit()
print('No')

Submission status: Wrong Answer

Solution code:
z=[]
a=[]
b=[]
x, y= map(int,input().split())
for i in range(x):
    a.append(i)


for i in a:
    b.append(i+1)
    
b.append(0)
    
for i in b:
    print(i)

for i in b:
    if (4*x)-(2*i)==y:
        z.append('1')
for i in b:
    print((4*x)-(2*i))
    
        
if len(z)>0:
    print('Yes')

if len(z)<=0:
    print('No')

Submission status: Wrong Answer

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

turu = 2
kame = 4
flag =0

for x in range(a + 1):
    for y in range(a + 1):
        if kame * x + turu * y == b:
            flag += 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(1, h[0]+1):
    if 2 * i + 4 * (h[0]-i) == h[1]:
        print('Yes')
        exit()
print('No')

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
x = 0
y = 0
z = 0
if a * 4 < b:
    z = 1
else:
    for i in range(a):
        if x == b:
            break
        else:
            if x + 4 > b:
                if x + 2 > b:
                    continue
                else:
                    x = x + 2
            else:
                x = x + 4
if x == b:
    print("Yes")
elif z == 0:
    print("Yes")
elif z == 1:
    print("No")
else:
    print("No")

Submission status: Wrong Answer

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

turu = 2
kame = 4
flag =0

for x in range(a + 1):
    for y in range(a + 1):
        if ((kame * x) + (turu * y)) == b and (x + y) <= a:
            flag += 1

if flag == 0:
    print("No")
else:
    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+b) == X) and ((2*a+4*b) == Y):
    print('Ye')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
z=[]
a=[]
b=[]
x, y= map(int,input().split())
for i in range(x):
    a.append(i)


for i in a:
    b.append(i+1)
    
b.append(0)
    
for i in b:
    print(i)

for i in b:
    if (4*x)-(2*i)==y:
        z.append('1')
for i in b:
    print((4*x)-(2*i))
    
        
if len(z)>0:
    print('YES')

if len(z)<=0:
    print('NO')

Submission status: Wrong Answer

Solution code:
import sys

x, y = [int(x) for x in input().split()]
if y % 2 != 0:
    print("No")
    sys.exit()

n = (4 * x - y) / 2
if 0 <= n <= y:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
c = 0
res = b%2
re = b%4

if (res==0 and b/2<=a) or (re==0 and b/4<=a):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
max = x * 4
if y % 2 != 0:
  print('No')
elif max < y:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

turu = 2
kame = 4
flag =0

for x in range(a + 1):
    for y in range(a + 1):
        if (kame * x + turu * y) == b and (x + y) <= a:
            flag += 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x, y = list(map(int,input().split()))
ans = y / 2 - x 
if ans % 2 != 0:
    print("No")
elif x == y or x >= y or ans >= x:
    print("No")
elif ans <= x:
    print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

if ((a+b) == X) and ((2*a+4*b) == Y):
    print('Yes')
else:
    print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = [int(i) for i in input().split()]
if n[0]*4 < n[1] or n[1]%2 == 1 or n[1] < n[0] or n[0] == n[1]:
    print("No")
elif n[0]*4 >= n[1] or n[1]%2 == 0 or n[1] >n[0] or n[0] != n[1]:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

if X >= 101 or Y >= 101:
    print("No")
elif Y > 2 * X and Y > 4 * X:
    print("No")
elif X == 1 :
    if Y == 2 or Y == 4 :
        print("Yes")
    else:
        print("No")
else:
    if Y == 0 or X == 0:
        print("No")
    elif Y % 2 == 0 or Y % 4 == 0:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = list(map(int, input().split()))
def func(x):
    for i in range(0,(x[0]+1)*4,1):
        for j in range(0,(x[0]+1)*4,1):
            if i+j>x[0]:
                break
            if ((i*2 + j*4) == x[1]) or ((j*2 + i*4) == x[1]):
                print('Yes')
                return
    print('No')
    return
func(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = list(map(int, input().split()))
def func(x):
    for i in range(0,(x[0]+1)*2,1):
        for j in range(0,(x[0]+1)*2,1):
            if i+j>x[0]:
                break
            if ((i*2 + j*4) == x[1]) or ((j*2 + i*4) == x[1]):
                print('Yes')
                return
    print('No')
    return
func(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

x, y = [int(x) for x in input().split()]
if y % 2 != 0:
    print("No")
    sys.exit()

n = (4 * x - y) / 2
if 0 < n <= y:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())
N=0
M=0
A=0
B=0
C=0
N=Y%2
if N==0:
    M=X*4
    if M>=Y:
        A=Y%X
        B=Y/X
        if A==0:
            if B>2:
                print("Yes")
            else:
                print("No")
        else:
            if A>=0.5:
                C=B+1
                if C>2:
                    print("Yes")
                else:
                    print("No")
            else:
                if B>2:
                    print("Yes")
                else:
                    print("No")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

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

a = 0

for i in range(x):
    if (x - i)*4 == y or i * 2 ==y:
        a += 1
        break

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
x = 0
y = 0
z = 0
if a * 4 < b:
    z = 1
else:
    for i in range(a):
        if x == b:
            break
        else:
            if x + 4 > b:
                if x + 2 > b:
                    continue
                else:
                    x = x + 2
            else:
                x = x + 4
if x == b:
    print("Yes")
elif z == 1:
    print("No")
else:
    print("No")

Submission status: Wrong Answer

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

b = (y-(2*x))/2

if x - b < 0 or b < 0:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

turu = 2
kame = 4
flag =0

for x in range(a + 1):
    for y in range(a + 1):
        if (kame * x) + (turu * y) == b and (x + y) <= a:
            flag += 1

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

Submission status: Wrong Answer

Solution code:
def main():
    x, y = map(int, input().split())
    if x * 4 < y or y % 2 != 0 or x > 51:
        print('No')
    else:
        print('Yes')


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

if ((a+b) == X) and ((2*a+4*b) == Y):
    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:
  if N - int(crain) > 0:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

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

#print(x, y)
leg_turtle = 4
leg_clane = 2

if y > x * leg_turtle:
    print("No")
    exit()
elif y < leg_clane * x:
    print("No")
    exit()


for i in range(x + 1):
    clane = i
    turtle = x - i

    legs = 2 * clane + 4 * turtle

    if legs == y:
        print("Yes")
        exit()
    else:
        continue

Submission status: Wrong Answer

Solution code:
X,Y = (map(int, input().split()))
if abs(X-Y) <= X*4:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x = list(map(int, input().split()))
def func(x):
    for i in range(0,x[0]+1,1):
        for j in range(0,x[0]+1,1):
            if i+j>x[0]:
                break
            if ((i*2 + j*4) == x[1]) or ((j*2 + i*4) == x[1]):
                print('Yes')
                return
    print('No')
    return
func(x)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def main():
    x, y = map(int, input().split())
    if x * 4 < y or y % 2!=0 or x*2 > 101:
        print('No')
    else:
        print('Yes')


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
x = list(map(int, input().split()))
def func(x):
    for i in range(0,x[0]+1,1):
        for j in range(0,x[0]+1,1):
            if i+j>x[0]:
                break
            if i*2 + j*4 == x[1] or j*2 + i*4 == x[1]:
                print('Yes')
                return
    print('No')
    return
func(x)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def main():
    x, y = map(int, input().split())
    if x * 4 < y or y % 2!=0 or x*2 > 100:
        print('No')
    else:
        print('Yes')


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

#print(x, y)
leg_turtle = 4
leg_clane = 2

if y > x * leg_turtle:
    print("No")
    exit()
elif y < leg_clane * x:
    print("No")
    exit()


for i in range(x):
    clane = i
    turtle = x - i

    legs = 2 * clane + 4 * turtle

    if legs == y:
        print("Yes")
        exit()
    else:
        continue

Submission status: Wrong Answer

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

if 1 <= x <= 100 and 1 <= y <= 100:
  for a in range(0, 100, 1):
    if ( 2 * (x-a) + 4 * a == y and  a <= x ):
      print('yes')
      exit()

  print('no')
else:
  print('no')

Submission status: Wrong Answer

Solution code:
XY = list(map(int, input().split()))
X = XY[0]
Y = XY[1]
Z = Y - 2*X

for i in range(1,51):
  if Z == 2 * i and X - i>=1 and (X - i) <=100:
    print('Yes')
    break

  elif ((i==50) and (Z != 2*i)) or (X-i)>100 or (X-i)<1:
    print('No')

Submission status: Wrong Answer

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

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

if (a+b) == X and (2*a+4*b) == Y:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

a = 0

for i in range(x):
    if (x - i)*4 == y:
        a += 1
        break

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

Submission status: Wrong Answer

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


if x * 2 == y or x * 4 == y:
  print("Yes")
    
else:
  i = 0
  for i in range(1, x + 1):
    legs = 2 * i + 4 * (x - i)
  
    if legs == y:
      print("Yes")
      break
    
    else:
      print("No")

Submission status: Wrong Answer

Solution code:
def turukame(x,y,a,b):
    kame_legs = max(a,b)
    turu_legs = min(a,b)
    delta = kame_legs - turu_legs

    turu_num = (y*kame_legs - x)//delta
    kame_num = y - turu_num

    return (turu_num,kame_num)

X,Y = input().split()
a,b= turukame(int(Y),int(X),2,4)
if a >=0 & b>=0:
    if isinstance(a,int) & isinstance(b,int):
        print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import itertools
x, y = map(int, input().split())
i = [i for i in range(0, 101, 2)]
j = [j for j in range(0, 101, 4)]
i_lst = i[:x+1]
j_lst = j[:x+1]
comb = list(itertools.product(i_lst, j_lst))
data = [sum(x) for x in (comb)]
if y in data:
    print('Yes')
else:
    (print('No'))

Submission status: Wrong Answer

Solution code:
x, y = [int(x) for x in input().split()]
n = (4 * x - y) / 2
if 0 < n <= y:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def main():
    x, y = map(int, input().split())
    if x * 4 < y or x * 2 < y or y % 2!=0 or x*2 > 101:
        print('No')
    else:
        print('Yes')


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
import sys
count=0

if y == 0:
    print("No")
    sys.exit()

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




print("No")

Submission status: Wrong Answer

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

turu = 2
kame = 4
flag =0

for x in range(a + 1):
    for y in range(a + 1):
        if turu * x + kame * y == b and x + y <= a:
            flag += 1

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

Submission status: Wrong Answer

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


if 1 <= x <= 100 and 1 <= y <= 100:
  for a in range(0, 100, 1):
    if ( 2 * (x-a) + 4 * a == y and  a <= x ):
      print('yes')
      exit()

  print('no')

Submission status: Wrong Answer

Solution code:
x,y = map(int, input().split())
z = y - x*2
if z%2 == 0:
  print("yes")
else:
  print("no")

Submission status: Wrong Answer

Solution code:
x = list(map(int, input().split()))
def func(x):
    for i in range(0,x[0]+1,1):
        for j in range(0,x[0]+1,1):
            if i+j>x[0]:
                break
            if i*2 + j*4 == x[1]:
                print('Yes')
                return
    print('No')
    return
func(x)

Submission status: Wrong Answer

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



result="No"
sum_=0
for i in range(A[0]):
  
  if A[1] - sum_ >= 4:
    sum_+=4
  elif A[1] - sum_ >= 2:
    sum_ +=2
    
  if sum_ == A[1]:
    result="Yes"
  else:
    result="No"
    
    
  
print(result)

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
if y==(2*x)+2 or y==2*x or y==4*x:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
flag = ''
for i in range(x):
    if y > 4*x:
        flag = 'No'
    else:
        if y % 4 == 0:
            flag = 'Yes'
            y -= 4
        elif y % 2 == 0:
            flag = "Yes"
            y -= 2
        else:
            flag = 'No'
print(flag)

Submission status: Wrong Answer

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


if 1 <= x <= 100 and 1 <= y <= 100:
  for a in range(0, 100, 1):
    if ( 2 * (x-a) + 4 * a == y and  a < x ):
      print('yes')
      exit()

  print('no')

Submission status: Wrong Answer

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

if Y<X:
    print("No")
    exit()

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

A = (Y-2*X)/2

if X-A >= 0:
    print("Yes")
    exit()

print("No")

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())
count=0
for x1 in range(X+1):
    for x2 in range(X+1):
        if x1+x2<=X:
            if (x1*2)+(x2*4)==Y: count+=1
if count!=0: print("Yes")
else: print("No")

Submission status: Wrong Answer

Solution code:
z=[]
a=[]
b=[]
x, y= map(int,input().split())
for i in range(x):
    a.append(i)


for i in a:
    b.append(i+1)
    


for i in b:
    if (4*x)-(2*i)==y:
        z.append('1')
    
        
if len(z)>0:
    print('YES')

if len(z)<=0:
    print('NO')

Submission status: Wrong Answer

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

flag =0

for x in range(a + 1):
    for y in range(a + 1):
        if 4 * x + 2 * y == b and x + y <= a:
            flag += 1

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

Submission status: Wrong Answer

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

T = Y/2 - X
C = X - T

if T<0 or C<0:
  print('No')
else:
  if T+C==X:
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
import sys
count=0

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

print("No")

Submission status: Wrong Answer

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

result="No"
sum_=0
for i in range(A[0]):
 
  if A[1] - sum_ >= 4:
    sum_+=4
  elif A[1] - sum_ >= 2:
    sum_ +=2
    
  if sum_ == A[1]:
    result="Yes"
    
  
print(result)