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


a = 2*X - Y/2


if a >= 0 and isinstance(a, int):
  print("Yes")
else:
  print("No")

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

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

if a >= 0 and b >= 0 and isinstance(a, int) and isinstance(b, int):
  print("Yes")
else:
  print("No")

X, Y = map(int, input().split())
if Y % 2 == 1:
  print("No")
  exit()

a = (2 * X) - int(Y / 2)
b = X - a



if a >= 0 and isinstance(a, int) and b >= 0 and isinstance(b, int):
  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())

for t in range(X+1):
    k = X - t
    if t*2 + k*4 == Y:
        p = 1
        break
    else:
        p = 0

if p == 1:
    print("yes")
elif p == 0:
    print("no")

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

for t in range(X+1):
    k = X - t
    if t*2 + k*4 == Y:
        p = 1
        break
    else:
        p = 0

if p == 1:
    print("yes")
elif p == 0:
    print("no")

X,Y = map(int,input().split())
kame = (Y-2*X)

if kame%2 == 0:
    kame = kame//2
    turu = X-kame
    if X == kame+turu and kame>=0 and turu>=0:
        print('Yes')
    else:
        print('No')
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):
import itertools
x, y = map(int, input().split())
num = [i for i in range(1, x + 1)]
comb = list(itertools.combinations(num, 2))
print(num)
if y % 4 == 0 and y // 4 == x:
    print("Yes")
    exit()
elif y % 2 == 0 and y // 2 == x:
    print("Yes")
    exit()
for j in comb:
    print(j)
    if j[0] * 4 + j[1] * 2 == y:
        print("Yes")
        exit()
print("No")

x, y = map(int, input().split())
num = [i for i in range(1, x)]
comb = []
for k in num:
    comb.append([k, x - k])
if y % 4 == 0 and y // 4 == x:
    print("Yes")
    exit()
elif y % 2 == 0 and y // 2 == x:
    print("Yes")
    exit()
for j in comb:
    if j[0] * 4 + j[1] * 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):
X, Y = map(int, input().split())
ans = "NO"
for n in range(X+1):
    if 4*X-2*n == Y:
        ans = "YES"
        break
print(ans)

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

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

            
print("No")

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

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

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

            
print("No")


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

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

Verdicts: 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):
n,d=map(int,input().split())
ans=0
for _ in range(n):
  a,b=map(int,input().split())
  if (a*a+b*b) <= d*d:
    ans+=1
    
print(ans)

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

if y%2 ==1:
  print("No")
elif 2*x > y:
  print("No")
elif 4*x < 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):
x,y = map(int,input().split())
f = False
for a in range(x+1):
  for b in range(x-a+1):
    if 2*a + 4*b == y:
      print("Yes")
      f = True

if not f:
  print("No")


x,y = map(int,input().split())
f = False
for a in range(x+1):
  b=x-a
  if 2*a + 4*b == y:
    if not f:
      print("Yes")
      f = True

if not f:
  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):
from numpy.linalg import solve
X, Y = map(int, input().split())

left=[[1,1],[2,4]]
right=[X,Y]

a=solve(left,right)

if a[0] >=0 and a[1] >= 0 and a[0].is_integer() and a[1].is_integer():
    print("YES")
else:
    print("NO")


from numpy.linalg import solve
X, Y = map(int, input().split())

left=[[1,1],[2,4]]
right=[X,Y]

a=solve(left,right)

if a[0] >=0 and a[1] >= 0 and a[0].is_integer() and a[1].is_integer():
    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())
import math






n=y//2
if y%2==0 and math.ceil((y//2)/2)>=x:
    print('Yes')
else:
    print('No')

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








if y%2==0 and math.ceil((y/2)/2)<=x and x<=(y/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):
li = list(map(int, input().split()))
re = "Yes"
if li[0] * 2 < li[1]:
  re = "No"
elif li[0] % 2 == 0:
  if li[1] % 2 != 0:
    re = "No"
elif li[0] % 2 != 0:
  if li[1] % 2 == 0:
    re = "No"
print(re)
    

li = list(map(int, input().split()))
re = "Yes"
if li[0] * 4 < li[1]:
  re = "No"
elif li[0] * 2 > li [1]:
  re = "No"
elif li[1] % 2 != 0:
  re = "No"
print(re)
    


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+1):
    for j in range(x+1):
        ans=2*j+4*i
        if ans==y:
            print('YES')
            sys.exit()
print('NO')

import sys
x,y=map(int,input().split())
for i in range(x+1):
    for j in range(x+1):
        ans=2*j+4*i
        if ans==y and i+j==x:
            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):
import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

import numpy as np

x = na()
for i, xi in enumerate(x):
    if xi==0:
        print(i+1)



import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

x, y = na()
for t in range(100):
    for k in range(100):
        if x == (t + k) and y == 2*t + 4*k:
            print("Yes")
            quit()
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(0,X - 1):
    if Y == (2*i + 4*(X - i)):
        ans = "Yes"
print(ans)

X,Y= map(int, input().split())
turu = 2
kame = 4
exsist = False
for i in range(0,X+1):
    for j in reversed(range(0,X+1)):
        print(j)
        print(j-i)
        if Y == (turu* (j - i) + kame*j):
            exsist = True
            break

if exsist:
    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)

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

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

a = list(map(int,input().split()))
X = a[1]
Y = a[2]

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

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

X = a[0]
Y = a[1]
 
if (Y-2*X) % 2 == 0 and (Y-2*X) >= 0 and (4*X-Y) % 2 == 0 and (4*X-Y) >= 0:
	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())

turu = (4 * X - Y) / 2
kame = X - turu

if turu.is_integer() and turu > 0:
    if kame.is_integer() and kame > 0:
        print("Yes")
else:
    print("No")
    
print(turu, kame)

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

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

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

if Y % 2 == 1:
    print("No")
    sys.exit()

turu = (4 * X - Y) / 2
kame = X - turu

if turu >= 0 and kame >= 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):
def solution():
    user_input = input()
    animals, legs = [int(x) for x in user_input.split()]

    turtles = (4*animals - legs) / 2
    condition = turtles >= 0 and turtles % 1 == 0 and turtles <= animals
    if condition:
        print("Yes")
    else:
        print("No")

# accepted 

def solution():
    user_input = input()
    animals, legs = [int(x) for x in user_input.split()]

    if 4*animals < legs:
        print("No")
        return
    
    if 2*animals > legs:
        print("No")
        return

    turtles = animals 
    cranes = 0 

    while cranes <= animals:
        if 4*turtles + 2*cranes == legs:
            print("Yes")
            return
        
        turtles -= 1
        cranes += 1

    print("No")

def solution():
    user_input = input()
    animals, legs = [int(x) for x in user_input.split()]

    turtles = (4*animals - legs) / 2
    if turtles >= 0:
        print("Yes")
    else:
        print("No")

def solution():
    user_input = input()
    animals, legs = [int(x) for x in user_input.split()]

    turtles = (4*animals - legs) / 2
    if turtles >= 0 and turtles % 1 == 0:
        print("Yes")
    else:
        print("No")

def solution():
    user_input = input()
    animals, legs = [int(x) for x in user_input.split()]

    turtles = (4*animals - legs) / 2
    condition = turtles >= 0 and turtles <= animals and turtles % 1 == 0 
    if condition:
        print("Yes")
    else:
        print("No")

solution()

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

ans = 0

for i in range(0, x-1):
  rest = y - 2 * i
  if rest / (x - i) == 4:
    print('Yes')
    ans = 1
    break

if ans == 0:
  print('No')


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

ans = 0

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

if ans == 0:
  print('No')


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

ans = 0

for i in range(0, x + 1):
  # i is the number of the crane
  rest = y - (2 * i)
  if rest / 4 == x - i:
    print('Yes')
    ans = 1
    break

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

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

flag = False
if(a >= 0 and b >=0):
    flag = True

if flag:
    print('yes')
else:
    print('no')

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

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

a = round(a)
b = round(b)

flag = False
if(a >= 0 and b >=0):
    if(a + b == X and 4*a + 2*b == Y):
        flag = True

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

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

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

a = round(a)
b = round(b)

flag = False
if(a >= 0 and b >=0):
    if(a + b == X and 4*a + 2*b == Y):
        flag = True

if flag:
    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())


l=list(range(2*X,4*X+2,2))
print(l)

flag=False
for i in range(len(l)):
    if l[i]==int(Y):
        flag=True

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

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


l=list(range(2*X,4*X+2,2))
#print(l)

flag=False
for i in range(len(l)):
    if l[i]==int(Y):
        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())

a=b=0


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

if (y-2*x)%2==0:
    n=(y-2*x)/2
    if x-b>=0:

        print('鶴',x-b)
        print('亀',n)

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

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

a=b=0


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

if (y-2*x)%2==0:
    n=(y-2*x)/2
    if x-b>=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())


kame = 4
turu = 2


if Y == 2 and X == 1:
  print("Yes")
elif Y == 100 and X*kame < Y:
  print("No")
elif Y % turu != 0:
  print("No")
elif X*2 < Y:
  print("No")
else:
  ans = Y
  while True:
    Y = Y % 2
    ans = ans/2
    if Y != 0:
      print("No")
      break
    elif Y == 0 and ans == 0:
      print("Yes")
      break 


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


kame = 4
turu = 2


if Y == 2 and X == 1:
  print("Yes")
elif Y == 100 and X*kame < Y:
  print("No")
elif Y % turu != 0:
  print("No")
elif X*kame < Y:
  print("No")
else:
  ans = Y
  while True:
    Y = Y % 2
    ans = ans/2
    if Y != 0:
      print("No")
      break
    elif Y == 0 and ans == 0:
      print("Yes")
      break 
    else:
      print("No")

import sys

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


for i in range(100):
  for j in range(100):
    if i + j == X and 4*i + 2*j == Y:
      print("Yes")
      sys.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):
number = input()
list = number.split()
if int(list[1]) % 3 == 0 or int(list[0]) * 4 < int(list[1]):
    print("No")
else:
    a = 0
    for i in range(int(list[0])):
        a = i
        n = i + 1
        n2 = int(list[0] - n)
        if n * 2 + n2 * 4 == int(list[1]):
            print("Yes")
            break
    if a == int(list[0]) - 1:
      print("No")

number = input()
list = number.split()


def hoge(a, b):
    if a * 4 < b:
        print("No")
        return
    else:
        for i in range(a):
            n = i + 1
            n2 = a - n
            if n * 2 + n2 * 4 == b:
                print("Yes")
                return
        else:
            if a * 4 == b:
                print("Yes")
                return
            print("No")


hoge(int(list[0]), int(list[1]))

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 i in range(x):
    if y == 4x-2a:
        print("Yes")
else:
    print("No")

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

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

for i in range(x+1):
    if y == 4*x-2*i:
        print("Yes")
        sys.exit()
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())

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


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

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


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

for i in range(X+1):
    if (2*i + 4*(X - i)) == Y:
        print("Yes")
        break
else:
    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())
k = Y/2
q = y/4
if q<=X and X <= k:
    print("Yes")
else:
    print("No")


X, Y = map(int, input().split())
k = Y/2
q = y/4
if q<=X and X <= k:
    print("Yes")
else:
    print("No")


X, Y = map(int, input().split())
if Y % 2 == 1:
    print("No")
else:
    k = Y/2
    q = Y/4
    if q <= X and X <= k:
        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 = [int(x) for x in input().strip().split(" ")]

if Y % 2 == 1:
    print("No")
else:
    turtles = (Y - 2 * X) // 2
    cranes = (4 * X - Y) // 2
    print(cranes, turtles)
    if (0 <= turtles <= X) and (0 <= cranes <= X):
        print("Yes")
    else:
        print("No")


X, Y = [int(x) for x in input().strip().split(" ")]

if Y % 2 == 1:
    print("No")
else:
    turtles = (Y - 2 * X) // 2
    cranes = (4 * X - Y) // 2
    if (0 <= turtles <= X) and (0 <= cranes <= 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):
str1 = input()

A = str1.split(" ")


all4 = int(A[0])*4
res = "NO"

for i in range(0, int(A[0])+1):
    if all4 == int(A[1]):
        res = "YES"
        break
    else:
        all4 = all4 - 2
        
print(res)

str1 = input()

A = str1.split(" ")


all4 = int(A[0])*4
res = "No"

for i in range(0, int(A[0])+1):
    if all4 == int(A[1]):
        res = "Yes"
        break
    else:
        all4 = all4 - 2
        
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 = map(int, input())
if (y-x) > =x:
  print "Yes"
else:
  print "No"

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

x, y = map(int, input().split())
if y%2 == 1:
  print("No")
  exit()
b = y//2 -x
a = x - b
if (a >= 0) & (b >= 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())
a = (4x-y)/2
b = (-2x+y)/2
if a%1 == 0 and 0 <= aand b%1 == 0 and 0 <=b:
  print("Yes")
else:
  print("No")

x,y = int(input())
flag = 0
for i in range(x+1):
  if (y - 2*i)%4 == 0 and (y -  2 * i)//4 == x - i:
    flag += 1
    print("Yes")
    break
if flag == 0:
  print("No")

x,y = map(int,input().split())
a = (4*x-y)/2
b = (-2*x+y)/2
if a%1 == 0 and 0 <= a and b%1 == 0 and 0 <=b:
  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 sys
import numpy as np
import math
from collections import deque 
from functools import reduce

# input = sys.stdin.readline

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

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

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

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


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

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

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

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

Verdicts: Wrong Answer

Runtime Error

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

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


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

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

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

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 and a*4>=b:
    print('YES')
else:
    print('NO')


a,b=map(int,input().split())
n=0
for i in range(a+1):
    if 2*i+4*(a-i)==b:
        n+=1
    else:
        n==n
if n==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):
totalNum, totalFoot = map(int, input().split())

if totalFoot <= totalNum * 4:
    flg = False
    for i in range(totalNum + 1):
        craneNum = i
        turtleNum = totalNum - i
        foot = (craneNum * 2) + (turtleNum * 4)

        if foot == totalFoot:
            flg = True
            print("YES")
            break
    
    if not flg:
        print("NO")
else:
    print("NO")

totalNum, totalFoot = map(int, input().split())

if totalFoot <= totalNum * 4:
    flg = False
    for i in range(totalNum + 1):
        craneNum = i
        turtleNum = totalNum - i
        foot = (craneNum * 2) + (turtleNum * 4)

        if foot == totalFoot:
            flg = True
            print("Yes")
            break
    
    if not flg:
        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):
X, Y = map(int, input().split())

max = X * 4

if Y > max:
    print('No')
elif Y % 2 != 0:
    print('No')
else:
    for i in range(2*X, 4*X+1, 2):
        print(i)
        if i == Y:
            print('Yes')
            break
    else:
        print('No')


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

max = X * 4

if Y > max:
    print('No')
elif Y % 2 != 0:
    print('No')
else:
    for i in range(2*X, 4*X+1, 2):
        if i == 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):
animal,leg = [int(x) for x in input().split()]
# crane + turtle = animal

import numpy as np
A = np.array([
    [1,1],
    [2,4]
])
B = np.array([
    [animal],
    [leg]
])
A_inv = np.linalg.inv(A)
ans = A_inv.dot(B)
print(ans)
result = 0
for a in ans:
    for b in a:
        if b<0 or type(b) != int:
            result = 1
            break
if result:
    print("No")
else:
    print("Yes")
# print(ans)

animal,leg = [int(x) for x in input().split()]
# crane + turtle = animal

import numpy as np
A = np.array([
    [1,1],
    [2,4]
])
B = np.array([
    [animal],
    [leg]
])
A_inv = np.linalg.inv(A)
ans = A_inv.dot(B)
print(ans)
result = 0
for a in ans:
    for b in a:
        if b<0 or not b.is_integer():
            result = 1
            break
if result:
    print("No")
else:
    print("Yes")
# print(ans)

animal,leg = [int(x) for x in input().split()]
# crane + turtle = animal

import numpy as np
A = np.array([
    [1,1],
    [2,4]
])
B = np.array([
    [animal],
    [leg]
])
A_inv = np.linalg.inv(A)
ans = A_inv.dot(B)
result = 0
for a in ans:
    for b in a:
        if b<0 or not b.is_integer():
            result = 1
            break
if result:
    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):
x, y = tuple(map(int, input().split()))

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


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

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

for i in range(0, N+1):
  f = i * 2 + (N-i) * 4
  if f == M:
    print("yes")
    break
else:
  print("Np")

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

N, M = map(int, input().split())
for i in range(0, N+1):
  f = 2 * i + 4* (N-i)
  if f == M:
    print("Yes")
    break
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 a in range(X + 1):
    b = X - a
    if 2 * a + 4 * b == Y:
        ans = 'Yes'
        print('Yes')


X, Y = map(int, input().split())
 
ans = 'No'
if 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

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 = 2
b = 4

lista=[]
listb=[]

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

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


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

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

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

print('No')



# a = 2
# b = 4

# lista=[]
# listb=[]





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



#     print('Yes')

#     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,b = map(int, input().split())
if a*2 == b or a*4==b:
    print("Yes")
elif b%2==0 and y -2*a >= 0 and 4*a-b>=0:
    print("Yes")
else:
    print("No")

a,b = map(int, input().split())
if a*2 == b or a*4==b:
    print("Yes")
elif b%2==0 and b -2*a >= 0 and 4*a-b>=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):
import numpy as np

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

cranes = np.arange(X) * 2
turtles = (np.arange(X)*4).reshape(-1,1)

total = cranes + turtles

if np.any(total == Y):
  print('Yes')
else:
  print('No)
                    
 

import numpy as np

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

cranes = np.arange(X+1) * 2
turtles = (np.arange(X+1)*4).reshape(-1,1)

total = np.diag(np.fliplr(cranes + turtles))


if np.any(total == 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())
ans = 'No'
for a in range(X + 1):
	b = X - a
	if 2 * a + 4 * b == Y:
		ans = 'Yes'
7 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(x):
     j = x - i;
     print(i,j)
     if 2*i + 4*j == y or 2*j + 4*i == y:
         print('Yes')
         exit()
print('No')

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

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

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):
n,m=[int(n) for n in input().split()]
if(m>(n*4) or m<(n*2)):
  print("No")
else:
  if(m%2==0):
    print("Yes"):
  else:
    print("No")

n,m=[int(n) for n in input().split()]
if(m>(n*4) or m<(n*2)):
  print("No")
else:
  if(m%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):
num, legs = map(int, input().split())

flag = 1
tmp = num * 4
for i in range(num+1):
    if(tmp == legs):
        print("Yes")
        flag = 0
    else:
        tmp -= 2
if(flag == 1):
    print("No")

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

flag = 1
tmp = num * 4
for i in range(num+1):
    if(tmp == legs):
        print("Yes")
        flag = 0
        break
    else:
        tmp -= 2
if(flag == 1):
    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 = list(map(int, input().split()))
Sum = X+Y
if Sum%4 == 0:
    print("Yes")
else:
    print("NO")

x, y=map(int, input().split())
end = False
for i in range(x+1):
    if 4*i + 2*(x-i) == y:
        print("Yes")
        end = True
        break
if end == False:
    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())
isOK = False
kame = 0
turu = int(Y/2)
if turu == X:
  isOK = True
for i in range(turu-X):
  if turu != X:
    kame = kame + 1
    turu = turu - 2
  if (turu+kame) == X:
    isOK = True
    break
if isOK == True:
  print('YES')
else:
  print('NO')

X,Y = map(int,input().split())
isOK = False
kame = 0
turu = int(Y/2)
if turu == X:
  isOK = True
for i in range(turu-X):
  if (turu+kame) == X:
    isOK = True
    break
  if turu != X:
    kame = kame + 1
    turu = turu - 2
if Y%2 == 1:
  isOK=False
if isOK == True:
  print('Yes')
else:
  print('No')

X,Y = map(int,input().split())
turu = int(2*X - Y/2)
kame = int(-X +Y/2)
if (turu + kame) == X and turu>=0 and kame>=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 = int(map, input().split())

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

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

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

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

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


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

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

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

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

Verdicts: 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):
X,Y=map(int,input().split())
flg=False

if Y%2!=0 :
    print('No')
    flg=True
else:
    for i in range(0,X+1):
        j=X-i
        if i*2+j*4 == Y or j*2+i*4 == Y:
            print(i,j)
            print("Yes")
            flg=True
            break

if flg==False:
    print('No')

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

if Y%2!=0 :
    print('No')
    flg=True
else:
    for i in range(0,X+1):
        j=X-i
        if i*2+j*4 == Y or j*2+i*4 == Y:
            print("Yes")
            flg=True
            break

if flg==False:
    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-i+1):
        print(i,j)
        if 2*i+4*(X-i)==Y:
            print('Yes')
            exit(0)

print('No')

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

if 0<=(4*X-Y)//2<=X and (4*X-Y)%2==0:
    print('Yes')
    exit(0)

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 != 0:
	print('No')
else:
	b = y // 2 - x
	a = 2 * x - y
	if a >= 0 and b >= 0:
		print('Yes')
	else:
		print('No')


x, y = map(int, input().split())
if y % 2 != 0:
	print('No')
else:
	b = y // 2 - x
	a = 2 * x - y/2
	if a >= 0 and b >= 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())
# check for only cranes
if x * 2 == y or x * 4 == y:
    print("Yes")
else:
    print("No")

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

Verdicts: Wrong Answer

Accepted