TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
x, y = map(int, input().split())
print("Yes" if x*2 <= y <= x*4 and x%2 = 0 else "No")

x, y = map(int, input().split())
print("YES" if x*2 <= y <= x*4 else "NO")

x, y = map(int, input().split())
print("Yes" if x*2 <= y <= x*4 and y%2 == 0 else "No")

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def main():
    na, nl = (int(i) for i in input().split())
    nc = (4*na - nl) / 2

    pos = nc == int(nc) and nc >= 0 and nc <= x

    if pos:
        print('Yes')
    else:
        print('No')
      
main()


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

pos = (4*x - y) // 2 >= 0

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

def main():
    na, nl = (int(i) for i in input().split())
    nc = (4*na - nl) / 2

    pos = nc == int(nc) and nc >= 0 and nc <= na

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


def main():
    na, nl = (int(i) for i in input().split())
    nc = (4*na - nl) / 2

    pos = (nc == int(nc) and nc >= 0 and nc <= na)

    if pos:
        print('Yes')
    else:
        print('No')
      
main()


Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x,y=map(int,input().split())
if y-2*x< 0 or y-2*x %2:
  print('No')
elif 4*x-y<0 or 4*x-y%2:
  print('No')
else:
  print('Yes')

import sys
x,y=map(int,input().split())
if y%2:
  print('No')
  sys.exit()
a2=4*x-y
b2=y-2*x
if a2==0 and b2==0:
  print('No')
elif a2 < 0:
  print('No')
elif b2 < 0:
  print('No')
else:
  print('Yes')


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
n, m = map(int, input().split())

if m % 2 == 0 or m % 4 == 0:
  if (n * 4) >= m:
    print("YES")
  else:
    print("NO")
else:
  print("NO")

n, m = map(int, input().split())

if m % 2 == 0 or m % 4 == 0:
  if (n * 4) >= m:
    if (n*2) <= m:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
else:
  print("No")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a,b=map(int,input().split())
if (b-2*a) %2==0 and b-2*a >=0 :
  print('YES')
  

a,b=map(int,input().split())

if b%2==0:
  x=b/2-a
  y=2*a-b/2
  if x >=0 and y>=0:
    print('YES')
  else:
    print('NO')
else:
  print('NO')

a,b=map(int,input().split())

if b%2==0:
  x=b/2-a
  y=2*a-b/2
  if x >=0 and y>=0:
    print('YES')
  else:
    print('NO')
else:
  print('NO')

a,b=map(int,input().split())

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x, y= map(int, input().split(' '))

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

l= input().split(' ')
x= int(l[0])
y= int(l[1])

def f(x,y):
	if y%2==1:
		return 'No'
	for i in range(2*x, 4*x+1):
		if i==y:
			return 'Yes'
	return 'No'


print(f(x,y))

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
2 100

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
ans = "No"
foots = 2*X
for tsuru in range(X+1):
    if foots == Y:
        ans = "Yes"
    foots += 2
    
    
print(ans)

X,Y = map(int, input().split())
ans = "No"
foots = 2*X
for tsuru in range(X+1):
    if foots == Y:
        ans = "Yes"
    foots += 2
    
    
print(ans)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
x,y = input().split()
a = (2 * int(x)) - (int(y)/2)
b = (int(y)/2) - int(x)

if (a + b == int(x)) and ((2*a) + (4*b) == int(y)) and a>=0 and b>=0:
    print("yes") 
else:
    print("no")

x,y = input().split()
a = (2 * int(x)) - (int(y)/2)
b = (int(y)/2) - int(x)

print(f"turu = {a}")
print(f"kame = {b}")
if (a + b == int(x)) and ((2*a) + (4*b) == int(y)) and a>=0 and b>=0:
    print("yes") 
else:
    print("no")

x,y = input().split()
import math
a = math.floor((2 * int(x)) - (int(y)/2))
b = math.floor((int(y)/2) - int(x))

if (a + b) == int(x) and ((2*a) + (4*b) == int(y)) and a>=0 and b>=0:
    print("Yes") 
else:
    print("No")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a,b=map(int,input().split())
if(b%4!=0 and b%2==0):
    print('Yes')
else:
    print('No')

a,b=map(int,input().split())
if(b%4!=0 and b%2==0 and b>=2*a and b<=4*a):
    print('Yes')
else:
    print('No')

a,b=map(int,input().split()))
if(b%(2*a)==0 or b%(4*a)==0):
    print('No')
else:
    print('Yes')

a,b=map(int,input().split())
if(b%2*a==0 or b%4*a==0):
    print('No')
else:
    print('Yes')

a,b=map(int,input().split())
k=[]
j=a
for i in range(a+1):
    k.append(2*j)
    j=j+1
#print(k)
if(b in k):
    print('Yes')
else:
    print('No')

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import numpy as np
num_list = []

def leg_num(c, t):
    return 2*c+4*t

for i in range(1, 101):
    leg_num_list = []
    for j in range(i):
        if leg_num(j, i-j) <= 100:
            leg_num_list.append(leg_num(j, i-j))
        if leg_num(i-j, j) <= 100:
            leg_num_list.append(leg_num(i-j, j))
    num_list.append(leg_num_list)

x, y = map(int, input().split(" "))
    if y in num_list[x]:
        print("Yes")
    else:
        print("No")

import numpy as np
num_list = []

def leg_num(c, t):
    return 2*c+4*t

for i in range(1, 101):
    leg_num_list = []
    for j in range(i):
        if leg_num(j, i-j) <= 100:
            leg_num_list.append(leg_num(j, i-j))
        if leg_num(i-j, j) <= 100:
            leg_num_list.append(leg_num(i-j, j))
    num_list.append(leg_num_list)

x, y = map(int, input().split(" "))
if y in num_list[x-1]:
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
x,y=map(int,input().solit())
if 2*x<=y and y%2==0 and 4*x>=y:
    print('Yes')
else:
    print('No')


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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
#!/usr/local/bin/python3
# coding: utf-8

ha = input()
kita = ha.split(" ")
x = int(kita[0])
y = int(kita[1])
ifAshi = False

for i in range(x):
    if(x = 1):
        if(y == 2 or y == 4):
            ifAshi = True
    if((y - 2*i)%4 == 0):
        if((x-i) == ((y - 2*i)/4)):
            ifAshi = True

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

#!/usr/local/bin/python3
# coding: utf-8

ha = input()
kita = ha.split(" ")
x = int(kita[0])
y = int(kita[1])
ifAshi = False

if(x == 1):
    if(y == 2 or y == 4):
        ifAshi = True
if(x*2 == y):
    ifAshi = True
for i in range(x):
        
    if((y - 2*i)%4 == 0):
        if((x-i) == ((y - 2*i)/4)):
            ifAshi = True

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

Verdicts: Runtime Error

Accepted
Problem: 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.

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

XY = list(map(int, input().split()))

if 4*XY[0] - XY[1] >= 1 and -3*XY[0] + XY[1] >= 1:
  print('YES')
else:
  print('NO')

y
XY = list(map(int, input().split()))

if 2 * XY[0] - XY[1] / 2 == 0 and -XY[0] + XY[1] / 2 == 0:
  print('NO')

if 2 * XY[0] - XY[1] / 2 >= 0 and -XY[0] + XY[1] / 2 >= 0:
  print('YES')
else:
  print('NO')

XY = list(map(int, input().split()))
 
c = 2 * XY[0] - XY[1] / 2
t = - XY[0] + XY[1] / 2
 
if not (isinstance(c, int) and isinstance(t, int)):
  print('No')
elif c == 0 and t == 0:
  print('No')
elif c >= 0 and t >= 0:
  print('Yes')
else:
  print('No')

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

XY = list(map(int, input().split()))
 
c = 2 * XY[0] - XY[1] / 2
t = - XY[0] + XY[1] / 2
 
if not (isinstance(c, int) and isinstance(t, int)):
  print('No')
elif c == 0 and t == 0:
  print('No')
elif c >= 0 and t >= 0:
  print('Yes')
else:
  print('No')

XY = list(map(int, input().split()))

c = 2 * XY[0] - XY[1] / 2
t = - XY[0] + XY[1] / 2

if (not isinstance(c, int)) or (not isinstance(t, int)):
  print('NO')
elif c == 0 and t == 0:
  print('NO')
elif c >= 0 and t >= 0:
  print('YES')
else:
  print('NO')

XY = list(map(int, input().split()))
 
c = 2 * XY[0] - XY[1] / 2
t = - XY[0] + XY[1] / 2
 
if not isinstance(XY[1] / 2, int):
  print('No')
elif c == 0 and t == 0:
  print('No')
elif c >= 0 and t >= 0:
  print('Yes')
else:
  print('No')

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')

XY = list(map(int, input().split()))
 
c = 2 * XY[0] - XY[1] / 2
t = - XY[0] + XY[1] / 2
 
if not (XY[1] / 2).is_integer():
  print('No')
elif c == 0 and t == 0:
  print('No')
elif c >= 0 and t >= 0:
  print('Yes')
else:
  print('No')

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x,y=list(map(int,input().split()))
sum=0
if x==1:
    if y==2 or y==4:
        print("Yes")
    else:
        print("No")
elif y%2!=0:
    print("No")
else:
    for i in range(x):
        print(i)
        if sum%4==2 and sum!=y:
            sum+=2
            print(sum)
        elif sum%4==0 and sum!=y:
            sum+=4
            print(sum)
    if sum==y:
        print("Yes")
    else:
        print("No")

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

a=2*x-(1/2)*y
b=(1/2)*y-x
if (a>=0 and b>=0) and a.is_integer()==True and b.is_integer()==True:
    print("Yes")
else:
    print("No")
    

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a = input()
a = a.split()
x = int(a[0])
y = int(a[1])
if y >= x * 2 and y <= x * 4 and y % 2 == 0:
  print("yes")
else:
  print("no")

a = input()
a = a.split()
x = int(a[0])
y = int(a[1])
if y >= x * 2 and y <= x * 4 and y % 2 == 0:
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
X, Y = map(int, input().split())

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

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

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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")

import sys

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

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

if X == 1:
    if Y == 4 or Y == 2:
        print("YES")
        sys.exit()

print("NO")

import sys

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

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

if X == 1:
    if Y == 4 or Y == 2:
        print("YES")
        sys.exit()

print("NO")

import sys

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

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

if X == 1:
    if Y == 4 or Y == 2:
        print("YES")
        sys.exit()

print("NO")

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()

if X == 1:
    if Y == 4 or Y == 2:
        print("YES")
        sys.exit()

print("NO")

import sys

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

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

if X == 1:
    if Y == 4 or Y == 2:
        print("Yes")
        sys.exit()

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

print("No")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
a = list(map(int,input().split()))
if a[1] % 2 == 1 :
  print("NO")
else :
  if a[0] * 2 <= a[1] and a[0]*4 >= a[1] :
    print("YES")
  else :
    print("NO")

a = list(map(int,input().split()))
if a[1] % 2 == 1 :
  print("No")
else :
  if a[0] * 2 <= a[1] and a[0]*4 >= a[1] :
    print("Yes")
  else :
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: 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.

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

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

n=input()
x,y=n.split()
for c in range(int(x)+1):
  cnt=0
  t=int(x)-c
  asi=2*c+4*t
  if asi==int(y):
    print("Yes")
    cnt=1
    break
if cnt==0:
  print("No")

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x,y=(map(int,input().split()))
s=(4*x-y)/2.0
if s > 0 and (s*10%10==0):
    print("YES")
else:
    print("NO")



x,y=(map(int,input().split()))
s=(4*x-y)/2.0
if s >= 0 and (s*10%10==0) and s <= x:
    print("Yes")
else:
    print("No")



Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys
X ,Y = map(int,input().split())
for i in range(0, X+1):
  print(i)
  print(X-i)
  if 2*i + 4*(X-i) == Y:
    print("Yes")
    sys.exit()
print("No")
  

import sys
x,y = map(int,input().split())
for i in range(0,x+1):
  if 2*i + 4*(x-i) == y:
    print("Yes")
    sys.exit()
print("No")
  
    

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
X, Y = map(int, input().split())
ans = "No"

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

print(ans)


X, Y = map(int, input().split())
ans = "No"

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

print(ans)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x, y = map(int, input().split())
if x >= 2*x and y <= 4*y and y % 2 ==0 or y % 4 ==0:
  print(Yes)
else:
  print(No)

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


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


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
X, Y = map(int, input().split())
ans = 'No'
for a in range(X + 1):
  b = X - a
  if 2 * a + 4 * b == Y:
  ans = 'Yes'
print(ans)

X, Y = map(int, input().split())
ans = 'No'
for a in range(X + 1):
  b = X - a
  if 2 * a + 4 * b == Y:
    ans = 'Yes'
print(ans)

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
x, y =map(int,input().split())

for i in range (0,x + 1):
  z = 2*i + 4 * (x-i)
  if z == y:
    print('YES')
    break
else:
  print('NO')
 

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

for i in range (0,x + 1):
  z = 2*i + 4 * (x-1)
  if z == y:
    print('YES')
    break
else:
  print('NO')
 

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

for i in range (0,x + 1):
  z = 2*i + 4 * (x-i)
  if z == y:
    print('YES')
    break
else:
  print('NO')
 

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

for i in range (0,x + 1):
  z = 2*i + 4 * (x-i)
  if z == y:
    print('YES')
    break
else:
  print('NO')
 

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

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys

argv = input().split()

X = int(argv[0])
Y = int(argv[1])
success = 0

for i in range(X):
  if ((2 * i) + (4 * (X - i))) == Y:
    success = 1

if success == 0:
  print ("no")
else:
  print ("yes")

import sys

argv = input().split()

X = int(argv[0])
Y = int(argv[1])
success = 0

for i in range(X+1):
  if ((2 * i) + (4 * (X - i))) == Y:
    success = 1

if success == 0:
  print ("no")
else:
  print ("yes")

import sys

argv = input().split()

X = int(argv[0])
Y = int(argv[1])
success = 0

for i in range(X):
  if ((2 * (i+1)) + (4 * (X - (i+1)))) == Y:
    success = 1

if success == 0:
  print ("no")
else:
  print ("yes")

import sys

argv = input().split()

X = int(argv[0])
Y = int(argv[1])
success = 0

for i in range(X+1):
  if ((2 * i) + (4 * (X - i))) == Y:
    success = 1

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x, y = input().split()
x = int(x)
y = int(y)

if y % 2 != 0 or x >= y:
    print("No")
elif y == x*2 or y == x*4:
    print("Yes")
elif (y - (x*2))%4 == 0 and x*4 == (y - (x*2)):
    print('Yes')
elif (y - (x*4))%2 == 0 and x*2 == (y - (x*4)):
    print('Yes')
else:
    print("No")

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x,y=(int(x) for x in input().split())
a = ((y-x*2)/2)
if a%1==0 and a>=0 and a<=x:
    print("YES")
else:
    print("NO")

x,y=(int(x) for x in input().split())
a = ((y-x*2)/2)
if a%1==0 and a>=0 and a<=x:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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')

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x,y = map(int,input().split())
if y < x * 4 and y > x * 2 and y % 2 == 0:
    ans ="No"
else :
    ans ="Yes"
print(ans)

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
X, Y = map(int,input().split())

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

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

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

X, Y = map(int,input().split())
XX = X +1
for i in range(XX) :
    if Y -(4*i) == (X-i)*2 :
        print("Yes")
        exit()

print("No")

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
nums = input().split()
[X, Y] = list(map(int, nums))

if Y <= 4 * X && Y >= 2 * X:
    print('Yes')
else:
    print('No')


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

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


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
X, Y = map(int, input().split())

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

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x,y = map(int,input().split())

if  (y - x*2)%2 == 0:
    a = (y-x*2)//2
    b = x - a
    if a < 0 or b < 0:
        print("NO")
        exit(0)
    elif y == b * 2 + a * 4:
        print("YES")
    else:
        print("NO")
else:
    print("NO")


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

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


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

if  (y - x*2)%2 == 0:
    a = (y-x*2)//2
    b = x - a
    if b < 0:
        print("NO")
        exit(0)
    if y == b * 2 + a * 4:
        print("YES")
        exit(0)


print("NO")


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

if  (y - x*2)%2 == 0:
    a = (y-x*2)//2
    b = x - a
    if b < 0:
        print("NO")
        exit(0)
    if y == b * 2 + a * 4:
        print("YES")

else:
    print("NO")


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

if  (y - x*2)%2 == 0:
    a = (y-x*2)//2
    b = x - a
    if a < 0 or b < 0:
        print("No")
        exit(0)
    elif y == b * 2 + a * 4:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x,y=map(int,input().split(" "))

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
N, A = list(map(int, input().split()))

for i in range(N+1):
  count = i * 2 + (N - i) * 4
  if count == A:
    print('Yes')
print('No')

N, A = list(map(int, input().split()))

flag = False
for i in range(N+1):
  count = i * 2 + (N - i) * 4
  if count == A:
    flag = True

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
X, Y = map(int, input().split())

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


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

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
XY = input()
xy = list(map(int, XY.split()))

x = xy[0]
y = xy[1]

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


XY = input()
X = int,(XY.split([0]))
Y = int,(XY.split([1]))

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

XY = input()
xy = list(map(int, XY.split()))

x = xy[0]
y = xy[1]

exist = False
for i in range(x + 1):
  if 2 * i + 4 * (x - i) == y:
    exist = True
    break
    
if exist:
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
x, y = map(int, input().split())
foot = y - x * 2

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

x, y = map(int, input().split())
foot = y - x * 2

if foot % 2 == 0 and 0 <= foot and foot <= x * 2:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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()


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


if __name__ == "__main__":
    main()

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
c = input()
c = c.split(' ')
x = int(c[0])
y = int(c[1])
sa = y - 2 * x
if sa % 4 == 0:
  print('Yes')
else:
  print('No')


c = input()
c = c.split(' ')
x = int(c[0])
y = int(c[1])
sa = 4 * x -y
sa /=2
sb = x - sa
all = sa * 2 + sb * 4
print(all)
if all == y and sa >=0 and sb >= 0:
  print('Yes')
else:
  print('No')

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

def main():
  c = input()
  c = c.split(' ')
  x = int(c[0])
  y = int(c[1])
  sa = y - 2 * x
  if sa % 4 == 0:
    print('Yes')
  else:
    print('No')
  
  
if __name__ == "__main__":
  main()

c = input()
c = c.split(' ')
x = int(c[0])
y = int(c[1])
sa = y - 2 * x
if sa % 4 == 0 and sa >= 0:
  print('Yes')
else:
  print('No')

c = input()
c = c.split(' ')
x = int(c[0])
y = int(c[1])
sa = 4 * x -y
sa /=2
sb = x - sa
all = sa * 2 + sb * 4
print(all)
if all == y:
  print('Yes')
else:
  print('No')

c = input()
c = c.split(' ')
x = int(c[0])
y = int(c[1])
sa = 4 * x -y
if sa % 2 == 0 and x*2 <= y and x*4>=y:
  print('Yes')
else:
  print('No')

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
X,Y = map(int, input().split())
ans = 0

if(Y%2 == 1 or Y > 4*X):
    ans = 0
elif(Y<4*X and Y%2 == 0 and 2*100 <= Y):
    ans = 1
    
if(ans == 0):
    print('No')
elif(ans == 1):
    print('Yes')

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

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x,y = map(int,input().split())
for i in range(x):
    for j in range(x):
        if i*2+j*4 == y and i+j == x:
            print("Yes")
            break
print("No")

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys
from collections import deque, defaultdict, Counter
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush
from math import ceil, floor, sqrt, gcd, inf
from copy import deepcopy
import numpy as np
import scipy as sp

INF = inf
MOD = 1000000007

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

tmp = 0
res = "No"

a = y - 2 * x
b = 4 * x - y
if 0 <= a <= x and 0 <= b <= x and a % 2 == 0 and b % 2 == 0:
    res = "Yes"

print(res)


import sys
from collections import deque, defaultdict, Counter
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush
from math import ceil, floor, sqrt, gcd, inf
from copy import deepcopy
import numpy as np
import scipy as sp

INF = inf
MOD = 1000000007

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

tmp = 0
res = "No"

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

print(res)


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x, y = input().split()
x = int(x)
y = int(y)

def check(x, y):
    
    if x * 4 > y:
        print("No")
        return

    
    if y % 2 != 0:
        print("No")
        return

    
    for i in range(0, x):
        
        leg2_animal = i+1
        leg4_animal = x - leg2_animal
        
        
        sum_legs = leg2_animal * 2 + leg4_animal * 4

        if sum_legs == y:
            print("Yes")
            return

    print("No")

check(x,y)

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

def check(x, y):
    
    for i in range(0, x+1):
        
        leg2_animal = i
        leg4_animal = x - leg2_animal
        
        
        sum_legs = leg2_animal * 2 + leg4_animal * 4

        if sum_legs == y:
            print("Yes")
            return

    print("No")

check(x,y)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
#a,b=map(int, input().split()) 

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

#a,b=map(int, input().split()) 

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

a,b=map(int, input().split()) 
if i in range(a):
    if((a-i)*2 + (i)*4 == b):
        print('Yes')
    else:
        print('No')
            

a,b=map(int, input().split()) 

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
num=[]
num=input().split(" ")
atama=int(num[0])
ashi=int(num[1])

count=0
for i in range(atama):
    if 2*(atama-i)+4*i == ashi:
        print("YES")
        break
    else:
        count=count+1
    
    if count == atama:
        print("No")

num=[]
num=input().split(" ")
atama=int(num[0])
ashi=int(num[1])

count=0
for i in range(atama+1):
    if 2*(atama-i)+4*i == ashi:
        print("YES")
        break
    else:
        count=count+1
    
    if count == atama+1:
        print("No")

num=[]
num=input().split(" ")
atama=int(num[0])
ashi=int(num[1])

count=0
for i in range(atama+1):
    if 2*(atama-i)+4*i == ashi:
        print("Yes")
        break
    else:
        count=count+1
    
    if count == atama+1:
        print("No")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
x, y = map(int, input().split())

turu_all = 2 * x
kame = (y - turu_all) / 2

turu = x - kame
if x == turu + kame:
    ans = "Yes"
    if turu < 0 or kame < 0 or type(kame) == float:
        ans = "No"

print(ans)

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

turu_all = 2 * x
a = y - turu_all
kame = a / 2
turu = x - kame

if x == turu + kame:
    ans = "Yes"
    if turu < 0 or kame < 0 or a%2 != 0:
        ans = "No"

print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
def inp():
    ls=list(map(int,input().split()))
    return ls
x,n=map(int,input().split())
ls=inp()
ls.sort()
if n==0:
    print(x)
    exit(0)
else:
    ans=0
    d=1000000000
    for i in range(1,101):
        if i in ls:
            continue
        tmp=abs(x-i)
        if tmp<d:
            d=tmp
            ans=i
    print(ans)

x,y=map(int,input().split())
if x==1 and x*4>=y and y%2==0 and x*2<=y:
  print('Yes')
elif x*4>= y and y%2==0 and x*2<=y:
    print('Yes')
else:
  print('No')

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
x, y = map(int, input().split())
judge='No'

for i in range(x+1):
  if(x==1 and (y==4 or y==2)):
    judge='Yes'
  if(y%4==0 and y/4==x):
    judge='Yes'
  if(y%2==0 and y/2==x):
    judge='Yes'
  for j in range(x+1-i):
    print(i, j)
    if((i*2+j*4)==y and i+j==x):
      judge='Yes'
      print(i*2, j*4)
    if((i*4+j*2)==y and i+j==x):
      judge='Yes'
      
if(y%2==1):
  judge='No'

print(judge)
  

x, y = map(int, input().split())
judge='No'

for i in range(x):
  if(x==1 and (y==4 or y==2)):
    judge='Yes'
  if(y%4==0 and y/4==x):
    judge='Yes'
  if(y%2==0 and y/2==x):
    judge='Yes'
  for j in range(x-i):
      if((((i*2+j*4)==y) or ((i*4+j*2)==y)) and i+j==x):
        judge='Yes'
      
if(y%2==1):
  judge='No'

print(judge)
  

x, y = map(int, input().split())
judge='No'

for i in range(x+1):
  if(x==1 and (y==4 or y==2)):
    judge='Yes'
  if(y%4==0 and y/4==x):
    judge='Yes'
  if(y%2==0 and y/2==x):
    judge='Yes'
  for j in range(x+1-i):
    print(i, j)
    if((i*2+j*4)==y and i+j==x):
      judge='Yes'
    if((i*4+j*2)==y and i+j==x):
      judge='Yes'
      
if(y%2==1):
  judge='No'

print(judge)
  

x, y = map(int, input().split())
judge='No'

for i in range(x+1):
  if(x==1 and (y==4 or y==2)):
    judge='Yes'
  if(y%4==0 and y/4==x):
    judge='Yes'
  if(y%2==0 and y/2==x):
    judge='Yes'
  for j in range(x+1-i):
    if((i*2+j*4)==y and i+j==x):
      judge='Yes'
    if((i*4+j*2)==y and i+j==x):
      judge='Yes'
      
if(y%2==1):
  judge='No'

print(judge)
  

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
# B - Crane and Turtle

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

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

#print(a,b)

if a>=0 and b>=0 and a%1==0.5 and b%1!=0.5:
    print("Yes")
else:
    print("No")

# B - Crane and Turtle

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

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

#print(a,b)

if a>=0 and b>=0 and a%1!=0.5 and b%1!=0.5:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted