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())
b = 0
if y % 2 != 0:
  print("NO")
  quit()
else:
  while x >= 0:
    c = x * 2 + b * 4
    if c == y:
      print("YES")
      quit()
    x -=1
    b +=1
print("NO")

X, Y = map(int, input().split())
A = x
B = 0
if Y % 2 != 0:
  print("NO")
  quit()
else:
  while A >= 0:
    C = A*2 + B*4
    if C == Y:
      print("YES")
      quit()
     A -=1
     B +=1
print("NO")

X, Y = map(int, input().split())
if X * 2 >= Y:
  print("YES")
else:
  print("NO")

x, y = map(int, input().split())
a = x
b = 0
if y % 2 != 0:
  print("NO")
  quit()
else:
  while a >= 0:
    c = a * 2 + b * 4
    if c == y:
      print("YES")
      quit()
    a -=1
    b +=1
print("NO")

X, Y = map(int, input().split())
A = X
B = 0
if Y % 2 != 0:
  print("NO")
  quit()
else:
  while A >= 0:
    C = A*2 + B*4
    if C == Y:
      print("YES")
      quit()
    A -=1
    B +=1
print("NO")

X, Y = map(int, input().split())
if X * 2 <= Y or X * 4 <= Y:
  print("YES")
else:
  print("NO")

X, Y = map(int, input().split())
if X * 2 <= Y:
  print("YES")
else:
  print("NO")

X, Y = map(int, input().split())
A = x
B = 0
if Y % 2 != 0:
  print("NO")
else:
  while A >= 0:
    C = A*2 + B*4
    if C == Y:
      print("YES")
      quit()
     A -=1
     B +=1
  print("NO")

X, Y = map(int, input().split())
A = X
B = 0
if Y % 2 != 0:
  print("NO")
else:
  while A >= 0:
    C = A*2 + B*4
    if C == Y:
      print("YES")
      A-=1
      B+=1
  print("NO")

X, Y = map(int, input().split())
A = X
B = 0
if Y % 2 != 0:
  print("NO")
  quit()
else:
  while A >= 0:
    C = A*2 + B*4
    if C == Y:
      print("YES")
      quit()
    A -=1
    B +=1
  print("NO")

x, y = map(int, input().split())
b = 0
if y % 2 != 0:
  print("No")
  quit()
else:
  while x >= 0:
    c = x * 2 + b * 4
    if c == y:
      print("Yes")
      quit()
    x -=1
    b +=1
print("No")

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

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 = '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(1, X+1):
    
    f = 2 * i + 4 * (X - i)
    if f == Y:
        print("YES")
        break
else:
    print("NO")

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

for i in range(X+1):
    f = (2 * i) + 4 * (X - i)
    if f == Y:
        print("Yes")
        break
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 (2*x)<y:
z=y-(2*x) 
a=z/2 

if a<=x and a>=0 and z%2==0:
    print('yes')
else:
    print('no')

x,y = map(int,input().split())
#if (2*x)<y:
z=y-(2*x) 
a=z/2 

if a<=x and z%2==0:
    print('yes')
else:
    print('no')

x,y = map(int,input().split())
#if (2*x)<y:
z=y-(2*x) 
a=z/2 

if a<=x and a>=0 and z%2==0:
    print('yes')
else:
    print('No')


x,y = map(int,input().split())
#if (2*x)<y:
z=y-(2*x) 
a=z/2 

if a<=x:
    print('yes')
else:
    print('no')

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

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

if a<=x:
    print('yes')
else:
    print('no')


x,y = map(int,input().split())
#if (2*x)<y:
z=y-(2*x) 
a=z/2 

if a<=x and a>=0 and z%2==0:
    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='Yes'
for i in range(X+1):
    if Y!=2*i+4*(X-i):
        print('No')
        break
print('No')

X,Y= map(int, input().split())
for i in range(X+1):
    if Y==2*i+4*(X-i):
        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):
x, y = map(int,input().split())

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

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

for i in range(x+1):
    for j in range(x+1):
        if i*2 + j*4 == y and i + j == x:
            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):
x, y = map(int, input().split())
for i in range(x+1):
  if(i*2 + (x+1-i)*4) == y or (i*4 + (x+1-i)*2) == y:
	print("Yes")
  else:
    print("No")
  break

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

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

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

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

Verdicts: Runtime Error

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 = int(input().split())

max_num = 4 * x
min_num = 2 * x

if y % 2 == 1:
    print('No')
elif (min_num <= y) and (max_num >= y):
    print('Yes')
else:
    print('No')

x, y = input().split()

if y % 2 == 1:
    print('No')

max_num = 4 * x
min_num = 2 * x

if (min_num <= y) and (max_num >= y):
    print('Yes')
else:
    print('No')

x, y = input().split()

max_num = 4 * x
min_num = 2 * x

if y % 2 == 1:
    print('No')
elif (min_num <= y) and (max_num >= y):
    print('Yes')
else:
    print('No')

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

max_num = 4 * x
min_num = 2 * x

if y % 2 == 1:
    print('No')
elif (min_num <= y) and (max_num >= y):
    print('Yes')
else:
    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):
flag = True
for a in range(101):
  if 2*a + 4*(x-a) == y:
    print("Yes")
    flag = False
    break
if flag:
  print("No")

x, y = map(int, input().split())
flag = True
for a in range(x+1):
  if 2*a + 4*(x-a) == y:
    print("Yes")
    flag = False
    break
if flag:
  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):
#import functools

def main():
    X, Y = tuple(int(c) for c in input().split(' '))
    for i in range(X+1):
        ashi = i*2 + (X-i)*4
        if ashi==Y:
            print('YES')
            #print(i, X-i)
            break
    else:
        print('NO')


if __name__ == "__main__":
    main()

#import functools

def main():
    X, Y = tuple(int(c) for c in input().split(' '))
    for i in range(X+1):
        ashi = i*2 + (X-i)*4
        if ashi==Y:
            print('Yes')
            #print(i, X-i)
            break
    else:
        print('No')


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):
x, y = map(int, input.split())
if y % 2 == 1:
  print('No')
elif x * 4 < y:
  print('No')
elif x * 2 > y:
  print('No')
else:
  print('Yes')

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

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

x = 1/2*(i[1]-2*i[0])
print(x)
if x < i[0] & isinstance(x, int):
  print('Yes')
else:
  print('No')


i = list(map(int, input().split()))
if i[1]%2 == 1:
  print('No')
  exit()

x = 1/2*(i[1]-2*i[0])
print(x)

if 0 <= x < i[0] and x.is_integer():
  print('Yes')
else:
  print('No')

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

x = 1/2*(i[1]-2*i[0])
print(x)

if x < i[0] and x.is_integer():
  print('Yes')
else:
  print('No')

i = list(map(int, input().split()))
if i[1]%2 == 1 or i[1] == 0:
  print('No')
  exit()

x = 1/2*(i[1]-2*i[0])
y = i[0] - x

if 0 <= x <= i[0] and x.is_integer():
  if 0 <= y <= i[0] and y.is_integer():
    print('Yes')
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):
s = input().split()
for i in range(int(s[0])+1):
	if((i * 2 + ((int(s[0])) - i) * 4) == int(s[1])):
		hantei = "OK"
		break
	else:
		hantei = "NG"
if(hantei == "NG"):
	print("NO")
else:
	print("YES")

s = input().split()
for i in range(int(s[0])+1):
	if((i * 2 + ((int(s[0])) - i) * 4) == int(s[1])):
		hantei = "OK"
		break
	else:
		hantei = "NG"
if(hantei == "NG"):
	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):
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()


import pulp


problem = pulp.LpProblem('clane_turtle', pulp.LpMaximize)


clane = pulp.LpVariable('clane', 0, 100, 'Integer') 
turtle = pulp.LpVariable('turtle', 0, 100, 'Integer') 


problem += 2 * clane + 4 * turtle


problem += clane + turtle == x
problem += 2 * clane + 4 * turtle <= y


status = problem.solve()
#print(pulp.LpStatus[status])
c = clane.value()
t = turtle.value()
res_1 =  2 * c + 4 * t
res_2 = c + t
#print(c, t)
if res_1 == y and res_2 == x:
    print("Yes")
else:
    print("No")


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
    #print(clane, turtle)

    legs = 2 * clane + 4 * turtle

    if legs == y:
        print("Yes")
        exit()
    else:
        continue
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):
a,b = map(int,input().split())
if(b%2!=0):
    print("NO")
else:
    z = b//2 
    y = b//4
    if(a>=y and a <=z):
        print('YES')
    else:
        print('NO')

a,b = map(int,input().split())
if(b%2!=0):
    print("NO")
else:
    z = 2*a 
    y = 4*a
    if(b>=z and b<=y):
        print('YES')
    else:
        print('NO')

a,b = map(int,input().split())
if(b%2!=0):
    print("No")
else:
    z = 2*a 
    y = 4*a
    if(b>=z and b<=y):
        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):
#Take the value of X
#Take the value of Y


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

C = (Y-4*X)/-2

T = X - ((Y-4*X)/-2)

total = int(T + C)

if (T<0) or (C<0):
    print("No")
elif (T%1 != 1) or (C%1 != 1):
    print("No")
elif (T+C) == X and (4*T + 2*C) == Y:
    print("Yes")
else:
    print("No")

vals1,vals2 = input().split(" ") #ask input in one line

a = int(vals1) #animals
b = int(vals2) #actual legs

possible= a*4 #highest possible legs


if possible<b : 
    print("no")

else:
    print("yes")

x, *y = map(int, input().split())
C= 2
T= 4
ans="No"
for i in range(x+1):
    b=x-i
    if Ci + Tb == y:
        answer = "Yes"
print(answer)

#define number of animals and legs
#function for the question can be understood as x=crane+turtles and y=2cranes+4turtles
def equation(numLeg, numAnim):
    for numCrane in range(0, numAnim):
        numTurt=numAnim-numCrane
        totalLeg=4*numTurt+2*numCrane
        if totalLeg==numLeg:
            return[numTurt,numCrane]
    return[None,None]
#input x and y
if __name__ == '__main__':
    x,y=int(input()).split()
    cranes,turtles=equation(y,x)
    if turtles==0:
        print("No")
    else:
        print("Yes")


x,y=map(int,input().split()) #input for x=animals, y=legs

c=2 #crane has 2 legs
t=4 #turtle has 4 legs

for i in range (x): #loop the number of animals

    a=x-i #the subtraction to get the number of turtle available for every loop starting from i=0

    if (i*c) +(t*a)==y: #the formula to get the amount of legs for both animals in a loop
        print ("yes") #if equals to y then there is a combination of both animals
    else:
        print("no")

X,Y = map(int,input().split()) #input number of animals and legs

crane_legs = 2
turtle_legs = 4

answer = "No"

for i in range(X+1): #X+1 because it will only consider 0,1,2
    remaining = X-i
    if crane_legs*i + turtle_legs*remaining == Y:
        answer = "Yes"
#Loop to check combinations of animals is correct

print(answer)

Verdicts: Wrong Answer

Wrong Answer

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):
A, B = (int(s) for s in input().rstrip().split())

if ((B - 2 * A) >= 2 or (4 * A - B) >= 2) and (B - 2 * A) >= 0 and (4 * A - B) >= 0 and (B - 2 * A) % 2 == 0 and (4 * A - B) % 2 == 0:
  print("YES")
else:
  print("NO")

A, B = (int(s) for s in input().rstrip().split())

if ((B - 2 * A) >= 2 or (4 * A - B) >= 2) and (B - 2 * A) >= 0 and (4 * A - B) >= 0 and (B - 2 * A) % 2 == 0 and (4 * A - B) % 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=(int(x) for x in input().split())
1<=x<=100
1<=y<=100
z=y/x
if y>x*6:
    print('No')
elif y<x*2:
    print('No')
elif y%2==1:
    print('No')
elif y==4 and x==1:
    print('No')
elif z==2 or z==3 or z==4 or z==5 or z==6:
    print('Yes')
else:
    print('No')


x,y=(int(x) for x in input().split())
1<=x<=100
1<=y<=100
z=y/x
if y>x*6:
    print('No')
elif y<x*2:
    print('No')
elif y%2==1:
    print('No')
elif y==4 and x==1:
    print('No')
elif z%1==1:
    print('Yes')
else:
    print('No')


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


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 A-2*B >=1 and  (A-2*B)%2==0:
  print("Yes")
else:
  print("No")

def main1():
    A,B=map(int,input().split())
    for x in range(0,401):
        for y in range(0,401):
            if x+y==A and 2*x+4*y==B:
                print("Yes")
                return 
    print("No")
     
main1()

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,l=map(int,input().split())
s=0
if l/a==2 or l/a==4:
	print("YES")
elif l<a:
	print("NO")
else:
	f=a*4
	if f>l:
		while f>l:
			f=f-2
		if f==l:
			print("YES")			
		else:
			print("NO")
	else:
		print("NO") 

a,l=map(int,input().split())
s=0
if l/a==2 or l/a==4:
	print("YES")
else:
	t,f=0,0
	for i in range(1,a+1):
		t+=1*2
		f+=1*4
	if f>l:
		while f!=l:
			f=f-2
		if f==l:
			print("YES")
		else:
			print("NO")
	else:
		print("NO") 

a,l=map(int,input().split())
s=0
if l/a==2 or l/a==4:
	print("YES")
else:
	f=a*4
	if f>l:
		while f>l:
			f=f-2
		if f==l:
			print("YES")			
		else:
			print("NO")
	else:
		print("NO") 

a,l=map(int,input().split())
s=0
if l/a==2 or l/a==4:
	print("YES")
elif l<a:
	print("NO")
else:
	f=a*4
	if f>l:
		for i in range(a):
			f=f-2
			if f==l:
				print("YES")
				break			
		else:
			print("NO")
	else:
		print("NO") 

a,l=map(int,input().split())
s=0
if l<a or a==0:
	print("NO")
elif l/a==2 or l/a==4:
	print("YES")

else:
	f=a*4
	if f>l:
		for i in range(a):
			f=f-2
			if f==l:
				print("YES")
				break			
		else:
			print("NO")
	else:
		print("NO") 

a,l=map(int,input().split())
s=0
if l/a==2 or l/a==4:
	print("YES")
else:
	t,f=0,0
	for i in range(1,a+1):
		t+=i*2
		f+=i*4
	if f>l:
		while f!=l:
			f=f-2
		if f==l:
			print("YES")
		else:
			print("NO")
	else:
		print("NO") 

a,l=map(int,input().split())
s=0
if l/a==2 or l/a==4:
	print("YES")
else:
	t,f=0,0
	for i in range(1,a+1):
		t+=i*2
		f+=i*4
if f>l:
	while f!=l:
		f=f-2
	if f==l:
		print("YES")
	else:
		print("NO")
else:
	print("NO") 

a,l=map(int,input().split())
s=0
if l<a or a==0:
	print("No")
elif l/a==2 or l/a==4:
	print("Yes")

else:
	f=a*4
	if f>l:
		for i in range(a):
			f=f-2
			if f==l:
				print("Yes")
				break			
		else:
			print("No")
	else:
		print("No") 

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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 = [int(x) for x in stdin.readline().rstrip().split()]
if Y % 2 == 0:
    Z = Y / X
    if 2 <= Z <= 4:
        print('Yes')
else:
    print('No')

from sys import stdin
X, Y = [int(x) for x in stdin.readline().rstrip().split()]
if Y % 2 == 0:
    Z = Y / X
    if 2 <= Z <= 4:
        print('Yes')
    else:
        print('No')
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())
ans = 2*X-Y/2
if ans >= 0 and ans%1 == 0:
  print('YES')
else:
  print('NO')

X,Y = map(int, input().split())
ans = 2*X-Y/2
if 0 <= ans <= X 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())
hon = 0
flag = False
for i in range(1,x+1):
    turu = i
    kame = x - i

    hon=2*turu+4*kame
    if hon == y:
        flag = True
        
for i in range(1,x+1):
    print(i)
    turu = x-i
    kame = i 

    hon=2*turu+4*kame
    if hon == y:
        flag = True
    
if flag == True:
    print('Yes')
else:
    print('No')

x,y  = map(int,input().split())
hon = 0
flag = False
for i in range(1,x+1):
    turu = i
    kame = x - i

    hon=2*turu+4*kame
    if hon == y:
        flag = True
        
for i in range(1,x+1):

    turu = x-i
    kame = i 

    hon=2*turu+4*kame
    if hon == y:
        flag = True
    
if flag == 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 = list(map(int,input().split()))
if (a[0] * 4) <= a[1]:
  if (a[0] * 2) >= a[1]:
    print("Yes")
  else:
    print("No")
else:
  print("No")


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

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

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

Verdicts: Wrong Answer

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())
print("Yes" if 2*X<=T<=4*X and (4*X-T)%2==0 else "No")

X, Y = map(int, input().split())
print("Yes" if 2*X<=Y<=4*X and Y%2==0 else "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())

answer = "No"

for i in range(x + 1):
  b = x - i
  if a * 2 + b * 4 == y:
    answer = "Yes"

print(answer)


animal_num, leg_num = map(int, input().split())

crawn = 2
tutle = 4

if leg_num > animal_num * tutle:
  print("no")
elif leg_num == animal_num * crawn:
  print("yes")
elif leg_num == animal_num * tutle:
  print("yes")
elif ((tutle * animal_num) - leg_num) % crawn == 0:
  print("yes")
else:
  print("no")


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

answer = "No"

for i in range(x + 1):
  y = x - i
  if a * 2 + b * 4 == y:
    answer = "Yes"

print(answer)

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

answer = "No"

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

print(answer)


Verdicts: Runtime Error

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

ans = 'No'
for i range(x+1):
  if (x*2 + (x-i)*4) == y:
    ans='Yes'
    break
print(ans)

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

ans = 'No'
for i in range(x+1):
  if (i*2 + (x-i)*4) == y:
    ans='Yes'
    break
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):
i = input().split()
i = [int(j) for j in i]

flg = 0
for a in range(i[0]):
  if 2*a+4*b==i[1]:
    print("Yes")
    flg = 1
    
if flg==0:
  print("No")

i = input().split()
i = [int(j) for j in i]
 
flg = 0
for a in range(i[0]+1):
  if 2*a+4*(i[0]-a)==i[1]:
    print("Yes")
    flg = 1
    
if flg==0:
  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):
if __name__ == '__main__':
    x, y = map(int, input().strip().split())
    flag = False

    if y % 2 == 1:
        print("No")
    else:
        sum = x * 4
        if sum == y:
            print("Yes")
        else:
            for i in range(x):
                sum -= 2
                if sum == y:
                    print("Yes")
                    break
                    flag = True
            if not flag:
                print("No")


if __name__ == '__main__':
    x, y = map(int, input().strip().split())
    flag = False

    if y % 2 == 1:
        print("No")
    else:
        sum = x * 4
        if sum == y:
            print("Yes")
        else:
            for i in range(x):
                sum -= 2
                if sum == y:
                    print("Yes")
                    flag = True
                    break

            if not flag:
                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().stlip(' '))

if y % 2 != 0:
  print('No')
elif y - 2 * x < 0:
  print('No')
else:
  print('Yes')
  


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

ans = 'No'
for x in range(X+1):
  if 2*x + 4*(X-x) == y:
    ans = 'Yes'
    break
    
print(ans)
  

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

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


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

if B % 2 == 1:
    print("NO")
else:
    if 2*A <= B and B <= 4*A:
        print("YES")
    else:
        print("NO")

A, B = map(int, input().split())

if B % 2 == 1:
    print("No")
else:
    if 2*A <= B and B <= 4*A:
        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 < 2 *X:
    print('No')
elif Y%2 != 0:
    print('No')
else:
    if (4*X-Y)%2 == 0 and (Y-2*X) == 0:
        print('Yes')
    else:
        print('No')   

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

if Y < 2 *X:
    print('No')
elif Y%2 != 0:
    print('No')
else:
    if (4*X-Y)%2 == 0 and (4*X-Y) >= 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())

y = (X + Y) / 2
if type(y) == "int":
    print("Yes")
else:
    print("No")

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

y = (Y - X) / 2
x = (4 * X - Y) / 2
if type(y) == "int" and type(x) == "int":
    print("Yes")
else:
    print("No")

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

if 4 * X < Y:
  print("No")
elif Y / 2 < X:
  print("No")
else:
  y = abs(Y - 2 * X)
  x = abs(4 * X - Y)
  if y%2 == 0 and x%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())
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+1):
        tmp = i*2+(4*(x-i))
        print(tmp)
        if tmp == y:
            print('Yes')
            sys.exit()
    print('No')


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(x+1):
        tmp = i*2+(4*(x-i))
        if tmp == 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):
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)

animal, leg = map(int, input().split())

answer = 'No'

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

print(answer)

animal, leg = map(int, input().split())

answer = 'No'

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

print(answer)

animal, leg = map(int, input().split())

answer = 'No'

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

print(answer)

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())
i = 'yes' if x * 2 <= y <= x * 4 and y % 2 == 0 else 'no'
print(i)

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

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 T in range(100):
  for K in range(100):
    if (T+K) == X and (2*T) + (4*K) == Y:
      print("YES")
      exit()
print("NO")

X, Y = map(int, input().split())
T = (Y - 2*X) / 2
K = X - (Y - 2*X) / 2
if (T >= 0) and (K >= 0):
  print("YES")
else:
  print("NO")
  

X, Y = map(int, input().split())
for T in range(100):
  for K in range(100):
    if (T+K) == X and (2*T) + (4*K) == Y:
      print("Yes")
      exit()
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(input().split()) #input number of animals and legs

crane_legs = 2
turtle_legs = 4

answer = "No"

for i in range(X+1): #X+1 because it will only consider 0,1,2
    remaining = X-i
    if crane_legs*i + turtle_legs*remaining == Y:
        answer = "Yes"
#Loop to check combinations of animals is correct

print(answer)

animals_and_legs=input()
list=animals_and_legs.split()
animals=int(list[0])
legs=int(list[1])
j=animals
i=0
something=True
while i<=animals:
    if i*4+j*2==legs:
        print("yes")
        something=False
        break
    i=i+1
    j=j-1
if something is True:
    print("no")



vals1,vals2 = input().split(' ') #ask input in one line

vals1 = int(vals1) #animals
vals2 = int(vals2) #actual legs

possible= vals1*4 #highest possible legs


if possible<vals2 : 
    print("no")

else:
    print("yes")

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

Crane = 2
Turtle = 4


X=i[0]
Y=i[1]

C=0
T=0
noAnimal = 0

def Calculate (C,T,Crane,Turtle,X,Y):
    if X > 100:
        return False
    if Y > 100:
        return False
    
    for C in range(50):
                
        for T in range(25):
            Leg = (T*Turtle)+(C*Crane)
            if Leg > 100:
                return False
            
            if Leg == Y:
                noAnimal = C+T
                return True

    return False
            
print (Calculate(C,T,Crane,Turtle,X,Y))

x,y=map(int,input().split()) #input for x=animals, y=legs

c=2 #crane has 2 legs
t=4 #turtle has 4 legs

for i in range (x+1): #loop the number of animals

    a=x-i #the subtraction to get the number of turtle available for every loop starting from i=0

    if (i*c) +(x*t)==y: #the formula to get the amount of legs for both animals in a loop
        print ("yes") #if equals to y then there is a combination of both animals
    else:
        print("no")

C, T = map(int, input().split())

#declare the output result no
result = 'No'
for a in range(C + 1):
b = C - a 

#but if the combination is in the cases the result will be yes
if 2 * a + 4 * b == T:
             result = 'Yes'

print(result)


#definiition
x,y= map(int,input().split())
crane= 2
turtle= 4
ans="No"
#Loop
for i in range(x+1):
    b=x-i
    if crane*i + turtle*b == y:
        ans = "Yes"
print(ans)

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

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

for i in range(n):
  if 4*i+2*(n-i)-l == 0:
    print("Yes")
    break
  else:
    print("No")

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

n,l = map(int,input().split())
count = 0 

for i in range(n+1):
  if 4*i+2*(n-i)-l == 0:
    print("Yes")
    count = 1
    break

if count == 0:
  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):
num = list(map(int, input().split()))

X= num[0]
Y =num[1]

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

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

X= num[0]
Y =num[1]
ans = "No"
for i in range(X+1):
  if 4*X - 2*i == Y:
    ans = "Yes"
    braek;
print(ans)

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

X= num[0]
Y =num[1]

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

num = list(map(int, input().split()))
X= num[0]
Y =num[1]

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

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):
def main():
    x, y = [int(v) for v in input().split(' ')]
    if y % 2 == 0 and y >= 2 * x and y <= 4 * x:
        print('yes')
    else:
        print('no')


if __name__ == '__main__':
    main()


def main():
    x, y = [int(v) for v in input().split(' ')]
    if y % 2 == 0 and y >= 2 * x and y <= 4 * x:
        print('Yes')
    else:
        print('No')


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

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

if ((y-(2*x))%2==0)&(x-((y-(2*x))/2))>0 :
  print("Yes")
else:
  print("No")

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

if (y % 2 == 0) and (x * 2 <= y <= x * 4):
  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()) 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)
  


A=list(map(int,input().split()))
a=[]
for n in range(0,101):
  for m in range(0,101):
    if n+m=A[0] & 2*n+4*m=A[1]:
      a.append(1)
    else:
      a.append(0)
      
if 1 in a:
  print('yes')
else:
  print('No')
      
  


A=list(map(int,input().split()))
a=[]
for n in range(0,a[0]+1):
    m=A[0]-n
    if 2*n+4*m=A[1]:
      a.append(1)
    
if 1 in a:
  print('yes')
else:
  print('No')
      
  


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

Runtime Error

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):
a = list(input().split(" "))
animal = int(a[0])
foot = int(a[1])
 
saisyo = 2 * animal
saidai = 4 * animal
 
if (foot % 2 = 0) and (saisyo <= foot <= saidai):
	print("Yes")
else:
    print("No")

a = list(input().split(" "))
animal = int(a[0])
foot = int(a[1])

saisyo = 1 * animal
saidai = 2 * animal
b = foot / 2

if (foot % 2 = 0) and (saisyo <= b <= saidai):
	print("Yes")
else:
    print("No")

a = list(input().split(" "))
animal = int(a[0])
foot = int(a[1])
 
saisyo = 2 * animal
saidai = 4 * animal
 
if (foot % 2 == 0) and (saisyo <= foot <= saidai):
	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):
import math

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

c = Y / 2 - X
t = X - c

if (c < 0 or t < 0 or c != math.floor(c) or t != math.floor(t)):
    print("NO")
else:
    print("YES")


import math

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

c = Y / 2 - X
t = X - c


if (c < 0 or t < 0 or c != math.floor(c) or t != math.floor(t)):
    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):
x, y = input().split()

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


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

for kame in range(0, x+1):
    tsuru = x - kame
    legs = kame * 4 + tsuru * 2
    if legs == y:
        print("Yes")
        break
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):
data=input().split()
x=int(data[0])
y=int(data[1])

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

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

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

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

if (y%2 == 0) and (y-2*x >= 0) and ((y-2*x)/2 <=x):
    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())
ans='No'
if Y % 2 == 0 and 0 <= (4 * X - Y) / 2 <= X:
    ans='Yes'
    exit()
print(ans)

X, Y = map(int, input().split())
ans='No'
if Y % 2 == 0 and 0 <= (4 * X - Y) / 2 <= X:
    ans='Yes'
    exit(0)
print(ans)

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

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

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

def test():
    x, y = map(int, input().split())
    if y&1:
        print("No")
        return
    print("Yes" if 2*x<=y<= 4*x else "No")
test()

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted