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

def main():
	x, y = map(int, input().split())
	for a in range(x):
		if y == a * 2 + 4 * (x - a):
			print('yes')
			return
		elif (y == x * 2) or (y == y*4):
			print('yes')
			return

	print('no')
	return

if __name__ == "__main__":
	main()


def main():
	x, y = map(int, input().split())
	for a in range(1, x):
		if y == a * 2 + 4 * (x - a):
			print('yes')
			return
	if (y == x * 2) or (y == x*4):
		print('yes')
		return

	print('no')
	return

if __name__ == "__main__":
	main()

def main():
	x, y = map(int, input().split())
	for a in range(x+1):
		if y == a * 2 + 4 * (x - a):
			print('Yes')
			return
	# if (y == x * 2) or (y == x*4):
	# 	print('Yes')
	# 	return

	print('No')
	return

if __name__ == "__main__":
	main()

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())
K = Y / 2 + X
T = 2 * X - Y / 2

if K.is_integer() and T.is_integer() and K * 4 + T * 2 == Y:
    print("Yes")
else:
    print('No')


X, Y = map(int, input().split())
K = Y / 2 - X#48
T = 2 * X - Y / 2 #

if K.is_integer() and K>=0 and T.is_integer() and T>=0 and K * 4 + T * 2 == Y and K + T == X:
    print("Yes")
else:
    print('No')


Verdicts: Wrong Answer

Accepted
Problem: There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs.  Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.

Submission attempts (in order):
x,y = map(int,input().split())
#2a+4b = y
#x = a+b
#x-a = b
#2a+4(x-a) = y
#y = 4x-2a

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


x,y = map(int,input().split())
a = int(input())
ans = 2*a + 4(x-a)
if ans == y:
  print('Yes')
else:
  print('No')


x,y = map(int,input().split())
a = int(input())
ans = 2*a + 4(x-a)
if ans == y:
  print('Yes')
else:
  print('No')


x,y = map(int,input().split())
#2a+4b = y
#x = a+b
#x-a = b
#2a+4(x-a) = y
#y = 4x-2a

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

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

import sys

X, Y = map(int, input().split())
ans = 'No'
if X[0] > 100 or X[1] > 100:
  print(ans)
  sys.exit()
if X[1] > X[0]*4 or X[1] < X[0]*2:
  print(ans)
  sys.exit()
if X[1] % 2 == 1:
  print(ans)
  sys.exit()

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


import sys

X, Y = map(int, input().split())
ans = 'No'
if X > 100 or Y > 100:
  print(ans)
  sys.exit()
if Y > X*4 or Y < X*2:
  print(ans)
  sys.exit()
if Y % 2 == 1:
  print(ans)
  sys.exit()

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

X = list(map(int, input().split()))
if X[0] > 100 or X[1] > 100:
  no_print
if X[1] > X[0]*4 or X[1] < X[0]*2:
  no_print
if X[1] % 2 == 1:
  no_print

number_check
  
def no_print():
  print(No)
  exit
    for I in list(range(1,100,1))

def number_check():
  turtle = X[0]
  crane = 0
  for (int i==0; i <= X[0]: i++):
    result = turtle * 4 + crane * 2 
    if result > X[1]:
      crane += 1
      turtle -= 1
    if result == X[1]:
      print(Yes)
      exit
    if result < X[1]:
      turtle += 1
      crane -= 1
      

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

if not ( 1 <= X <= 100 and 1 <= Y <= 100 ): sys.exit()

for I in range(101):
    for J in range(101):
        if (I*2 + J*4) == Y and I+J == X:
            print('Yes')
            sys.exit()
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())
for i in range(x+1):
    j = x-i
    if i*2+j*4 == y:
        print("yes")
        break
else: print("No")


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

x, y = map(int, input().split())
 
if y % 2 == 0 and (x * 2 <= y) and (x * 4 >= y):
  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, open(0).read().split())
c = ((x * 2) <= y <= (x * 4)) and y % 2 == 0
if c:
    print("YES")
else:
    print("NO")


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

Verdicts: Wrong Answer

Accepted
Problem: There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs.  Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.

Submission attempts (in order):

import itertools
from collections import defaultdict
import collections
import math
import sys
sys.setrecursionlimit(200000)
mod = 1000000007

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

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

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


import itertools
from collections import defaultdict
import collections
import math
import sys
sys.setrecursionlimit(200000)
mod = 1000000007

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

flag = False
for i in range(x + 1):
    for j in range((x + 1) - i):
        if (i * 2 + j * 4) == y and i+j== x:
            flag = True

if flag == False:
    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())
count = 0
for i in range(1, y + 1):
    if i % 2 == 0 or i % 4 == 0:
        count += 1
if count == x:
    print("Yes")
else:
    print("No")

x,y=map(int,input().split())
 
for i in range(x+1):
  j=x-i
  if j<0:continue
  if 2*i+4*j==y or 4*i+2*j==y:
    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())
P = "NO"

for i in range(X):
    bX = X - (i+1)
    bY = Y - 2 * (i+1)
    if 4 * bX == bY:
        P = "YES"
        
print(P)

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

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

Verdicts: Wrong Answer

Accepted
Problem: There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs.  Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.

Submission attempts (in order):
a,b=map(int,input().split())
for i in range(a):
  if 2*i+4*(a-i)==b:
    print("Yes")
    break
  else:
    print("No")
    break

a,b=map(int,input().split())
c=0
for i in range(a+1):
  if 2*i+4*(a-i)==b:
    print("Yes")
    c=1
    
    break
  else:
    pass
  
if c==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().strip().split())

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


x,y=map(int,input().strip().split())
if x*4<y or x*2>y:
  print("No")
elif y%2!=0:
  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())

c = 0

while x >= 0 :
    if c * 2 + x * 4 == y :
        break 
    c += 1
    x -= 1
else :
    print(No)

print(Yes)

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

ans = False
c = 0
t = x

while ans = False :
    if t = -1 :
        break 
        elif c*2+t*4 == y :
            ans = True
        elif : 
            c += 1
            t += -1

if ans :
    print(Yes)
    elif :
      print(No)
    

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

c = 0
t = x

while t >= 0 :
    if c * 2 + t * 4 = y :
        break 
    c += 1
    t += -1
else :
    print(No)

print(Yes)

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

c = 0
t = x

while t >= 0 :
    if c * 2 + t * 4 == y :
        break 
    c += 1
    t += -1
else :
    print(No)

print(Yes)

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

c = 0

while x >= 0:
    if c * 2 + x * 4 == y:
        break
    c += 1
    x += -1
else:
    print("No")
    exit()

print("Yes")


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

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

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

for i in range(0, X+1):
  if 4*i + 2*(X-i) == Y:
    flg = True
    break
  else:
    flg = False
if flg == 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):
x,y=map(int,input().split())
tr,km,flag=0,0,0
for i in range(x):
  tr+=1
  for l in range(x-tr):
    km +=1
    if tr+km==y:
      flag=1
if flag==1:
  print("Yes")
else:
  print("No")


x,y=map(int,input()).split())
tr,km,flag=0,0,0
for i in range(x):
  tr+=1
  for l in range(x-tr):
    km +=1
    if tr+km==y:
      flag=1
if frag==1:
  print("Yes")
else flag ==0:
  print("No")

x,y=map(int,input().split())
tr,km,flag=0,0,0

for i in range(x+1):
  z=x-i
  if i*2+z*4==y:
    flag=1
if flag==1:
  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())
for i in range(X+1):
    a = i
    b = X-i
    if 2*a+4*b == Y or 2*b+4*a == Y:
        print('Yes')
    else:
        print("No")

X, Y = map(int,input().split())
for i in range(X+1):
    a = i
    b = X-i
    if 2*a+4*b == Y or 2*b+4*a == 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())
a = (2 + 2 * x - y) / 2
b = (y - 4 * x) / 2
if a >= 0 and b >= 0 and a % 1 == 0 and b % 1 == 0:
    print('Yes')
else:
    print('No')

x, y = map(int, input().split())
a = (4 * x - y) / 2
b = (y - 2 * x) / 2
if a >= 0 and b >= 0 and a % 1 == 0 and b % 1 == 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())
Z = X * 4 - Y

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

X, Y = map(int, input().split())
Z = X * 4 - Y

if Z % 2 == 0 and X * 2 >= Z >= 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(i) for i in input().split()]
for i in range(x+1):
	j = x-i
	if (i*2)+(j*4) == y:
		print("Yes")
else:
	print("No")

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

x, y = [int(i) for i in input().split()]
for i in range(x+1):
	j = x-i
	if i*2+j*4 == y:
		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 = list(map(int,input().split()))
if y > 4*x or y < x*2 or y % 2 == 1:
    print("no")
else:
    print("yes")

x,y = list(map(int,input().split()))
if y > 4*x:
    print("No")
elif y < x*2:
    print("No")
elif y % 2 == 1:
    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())
flag = 0
for x in range(X+1):
    for y in range(X+1):
        print(x,y)
        if x + y == X and 2 * x + 4 * y == Y:
            flag = 1
            break
    if flag == 1:
        break
if flag == 0:
    print("No")
else:
    print("Yes")

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

Verdicts: Wrong Answer

Accepted
Problem: There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs.  Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.

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

flag = 0

for x in range(1,X+1):
    print(x)
    if 4 * X - 2 * x == Y:
        flag = 1

if X == 1 and Y == 2:
    flag = 1
if X == 1 and Y == 4:
    flag = 1

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


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

flag = 0

for x in range(0,X+1):
    if 4 * X - 2 * x == Y:
        flag = 1
        break

if X == 1 and Y == 2:
    flag = 1
if X == 1 and Y == 4:
    flag = 1

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

Verdicts: Wrong Answer

Accepted
Problem: There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs.  Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.

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

ans = (4*X-Y)/2

if ans.is_integer() and ans >0:
    print('yes')
else:
    print('No')


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

for i in range(1,X+1):
    foot = 2*i+4*(X-i)
    if foot==Y:
        print('Yes')
        break
    elif X==i and Y==4*i:
        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):
from sys import stdin, stdout
import sys
import bisect
INF=1e9
def get_int(): return int(stdin.readline().strip())
def get_ints(): return map(int,stdin.readline().strip().split()) 
def get_array(): return list(map(int,stdin.readline().strip().split()))
def get_string(): return stdin.readline().strip()
def op(c): return stdout.write(c)
#from collections import defaultdict 
#for _ in range(int(stdin.readline())):
x,y=get_ints()
if y%2==0:
    if y>=2*x and y<=4*x:
        print("YES")
    else:
        print("NO")
else:
    print('NO')

from sys import stdin, stdout
import sys
import bisect
INF=1e9
def get_int(): return int(stdin.readline().strip())
def get_ints(): return map(int,stdin.readline().strip().split()) 
def get_array(): return list(map(int,stdin.readline().strip().split()))
def get_string(): return stdin.readline().strip()
def op(c): return stdout.write(c)
#from collections import defaultdict 
#for _ in range(int(stdin.readline())):
x,y=get_ints()
if y%2==0:
    if y>=2*x and y<=4*x:
        print("YES")
    else:
        print("NO")
else:
    print('NO')

from sys import stdin, stdout
import sys
INF=1e9
def get_int(): return int(stdin.readline().strip())
def get_ints(): return map(int,stdin.readline().strip().split()) 
def get_array(): return list(map(int,stdin.readline().strip().split()))
def get_string(): return stdin.readline().strip()
def op(c): return stdout.write(c)
#from collections import defaultdict 
#for _ in range(int(stdin.readline())):
x,y=get_ints()
if y%2==0:
    if y>=2*x and y<=4*x:
        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):
def main():
    x = int(input())
    y = int(input())
    l = list()
    l.append(2*x)
    for i in range(1, x+1):
        l.append(2*x + i*2)
    if y in l:
        print('Yes')
    else:
        print('No')
        
if __name__ == '__main__':
    main()

def main():
    x, y = map(int, input().split())
    l = list()
    l.append(2*x)
    for i in range(1, x+1):
        l.append(2*x + i*2)
    if y in l:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

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())
s = 'No'
if 2 * x > y or 4 * x < y:
  s = 'No'
elif y % 2 == 0:
  s = 'No'
elif 2 * x == y or 4 * x == y:
  s = 'Yes'
elif (4*x - y) // 2 <= x:
  s = 'Yes'
else:
  s = 'No'

print(s)

x, y = map(int, input().split())
s = 'No'
if 2 * x > y or 4 * x < y:
  s = 'No'
elif y % 2 != 0:
  s = 'No'
elif 2 * x == y or 4 * x == y:
  s = 'Yes'
elif (4*x - y) // 2 <= x:
  s = 'Yes'
else:
  s = 'No'

print(s)

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())
def func(x,y):
    for i in range(x+1):
        for j in range(x+1):
            if i+j!=x:
                break
            if ((i*2 + j*4) == y) or ((j*2 + i*4) == y):
                print('Yes')
                return
    print('No')
    return
func(x,y)

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

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

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

Verdicts: 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 = map(int, input().split())
cnt2 = 0
cnt4 = 0
for i in range(101):
    cnt2 = 2*(i)
    cnt4 = 4*(x-i)
    print(cnt2,cnt4)
    if cnt2 + cnt4 == y:
        print("Yes")
        exit()

print("No")


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

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




for i in range(X):
  if 2*i ==  4*X - Y and i != 0:
      ans +=1
  elif 2*(i+1) == Y:
      ans +=1
  elif 4*(X-i) == Y:
      ans +=1


if ans > 0:
  print('Yes') 
else:
  print('No')

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

ans = 0



for i in range(Y):
  for j in range(Y):
      if 2*i + 4*j == Y and i + j == X:
          ans +=1
        
    
if ans > 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):
arr = list(map(int, input("").split()))
x=2*arr[0]
y=4*arr[0]

if arr[1]>=x and arr[1]<=y and arr[1]%2==0:
    print("YES")
else :
    print("NO")
    

arr = list(map(int, input("").split()))
x=2*arr[0]
y=4*arr[0]

if arr[1]>=x and arr[1]<=y and arr[1]%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())
if (y - 2*x) % 2 == 0 and (y - 2*x) >0 and (4*x - y) >0:
    print("OK")
else:
    print("NO")

x,y = map(int,input().split())
if (y - 2*x) % 2 == 0 and (y - 2*x) >= 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):
import sys

X,Y=(int(x) for x in input().split())
print(X,Y)
if Y%2==1:
  print('No')
  sys.exit()
  

check=int((Y-2*X)/2)
if check<=X:
  print('Yes')
else:
  print('No')

import sys

X,Y=(int(x) for x in input().split())

if Y%2==1:
  print('No')
  sys.exit()
if Y<2*X:
  print('No')
  sys.exit()
  

check=int((Y-2*X)/2)
#print(check)
if check<=X:
  print('Yes')
else:
  print('No')

Verdicts: Wrong Answer

Accepted
Problem: There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs.  Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.

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

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

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

def main():
  args = list(map(int, input().split()))
  nb = args[0]
  nl = args[1]
  if nb == 0 or (nl % 2 == 1):
    print('No')
    return
  if (nl / 4.0) > nb:
    print('No')
    return
  for i in range(1, nb):
    if (nl % (i * 4)) % 2 == 0:
      print('Yes')
  print('No')

if __name__ == '__main__':
  main()


import os

def main():
  args = list(map(int, input().split()))
  nb = args[0]
  nl = args[1]
  if nb == 0 or (nl % 2 == 1):
    print('No')
    return
  if (nl / 4.0) > nb:
    print('No')
    return
  for i in range(1, nb):
    if ((nb - i) * 2 + i * 4) == nl:
      print('Yes')
  print('No')

if __name__ == '__main__':
  main()


import os

def main():
  args = list(map(int, input().split()))
  nb = args[0]
  nl = args[1]
  if nb == 0 or (nl % 2 == 1):
    print('No')
    return
  if (nl / 4.0) > nb:
    print('No')
    return
  for i in range(1, nb + 1):
    if ((nb - i) * 4 + i * 2) == nl:
      print('Yes')
  print('No')

if __name__ == '__main__':
  main()


import os

def main():
  args = list(map(int, input().split()))
  nb = args[0]
  nl = args[1]
  if nl / (nb * 4) > nb:
    print('NO')
    return
  if (nl % (nb * 2)) % 2 == 0:
    print('YES')
  else:
    print('NO')

if __name__ == '__main__':
  main()

import os

def main():
  args = list(map(int, input().split()))
  nb = args[0]
  nl = args[1]
  if nb == 0 or (nl % 2 == 1) or nl == 0 or nl > nb:
    print('No')
    return
  for i in range(1, nb + 1):
    if ((nb - i) * 4 + i * 2) == nl:
      print('Yes')
      return
  print('No')

if __name__ == '__main__':
  main()


import os

def main():
  args = list(map(int, input().split()))
  nb = args[0]
  nl = args[1]
  if nb == 0 or (nl % 2 == 1) or nl == 0 or nb > nl or (nl / 4.0) > nb:
    print('No')
    return
  for i in range(nb + 1):
    if ((nb - i) * 4 + i * 2) == nl:
      print('Yes')
      return
  print('No')

if __name__ == '__main__':
  main()


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

for a in range(x + 1):
    if  a == - y / 2 + x:
        print('Yes')
        exit(1)

print('No')


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

for a in range(x + 1):
    tem = 2 * a + 4 * (x - a)
    if (tem == y):
        #  and (2 * x <= y <= 4 * x):
        print('Yes')
        exit()

print('No')

Verdicts: Runtime Error

Accepted
Problem: There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs.  Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.

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

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

Verdicts: Wrong Answer

Accepted
Problem: There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs.  Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.

Submission attempts (in order):
import sys
import math
import collections
import decimal
import itertools
from collections import deque
from functools import reduce
import heapq
#n = int(input())
x, y = map(int, sys.stdin.readline().split())
#s = input()
#x = list(map(int, sys.stdin.readline().split()))
     

if 2 ** x > y:
    print("NO")
    sys.exit()

if 4 ** x < y:
    print("NO")
    sys.exit()

if y % 2 == 1:
    print("NO")
else:
    print("YES")





















import sys
import math
import collections
import decimal
import itertools
from collections import deque
from functools import reduce
import heapq
#n = int(input())
x, y = map(int, sys.stdin.readline().split())
#s = input()
#x = list(map(int, sys.stdin.readline().split()))
     

if 2 * x > y:
    print("No")
    sys.exit()

if 4 * x < y:
    print("No")
    sys.exit()

if y % 2 == 1:
    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 = list(map(lambda x:int(x), input().split()))
X = x[0]
Y = x[1]

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

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

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

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

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

crain = (4 * X - Y) / 2
turtle = (Y - 2 * X) / 2

if (crain.is_integer() and crain >= 0) and ( turtle.is_integer() and turtle >= 0):n*2))
    print ("Yes")
else:
    print ("No")


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

crain = (4 * X - Y) / 2
turtle = (Y - 2 * X) / 2

if (crain.is_integer() and crain >= 0) and ( turtle.is_integer() and turtle >= 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())
ans = -1

a = np.array([[2, 4], [1, 1]])
b = np.array([y, x])
c, d = np.linalg.solve(a, b)
c = int(c)
d = int(d)
print(c, d)
if c + d == x and c >= 0 and d >= 0:
    print("Yes")
else:
    print("No")

import numpy as np
x, y = map(int, input().split())

a = np.array([[2, 4], [1, 1]])
b = np.array([y, x])
c, d = np.linalg.solve(a, b)
c = int(c)
d = int(d)

if c + d == x and c >= 0 and d >= 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())
flag = False
for i in range(1,X+1):
    for j in range(X-i):
        
        if 2*i+4*j == Y:
            flag = True
            break


if flag:
    print("Yes")
else:
    if X == 1:
        if Y == 2 or Y == 4:
            print("Yes")
    else:
        print("No")


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

if X == 1:
    if (Y == 2) or (Y == 4):
        flag = True
        
for i in range(X):
    for j in range(X):
        if i + j != X:
            continue
        print(i,j)
        print(2*i+4*j)
        if 2*i+4*j == Y:
            flag = True
            break


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


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

if X == 1:
    if (Y == 2) or (Y == 4):
        flag = True
        
for i in range(X+1):
    for j in range(X+1):
        if (i + j) == X:
            if 2*i+4*j == Y:
                flag = True
                break


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

tsuru = (x-2*y)/2
kame = (4*y-x)/2
if tsuru < 0 or kame < 0:
  print('no')
elif (x-2*y)%2 == 0 and (4*y-x)%2 == 0:
  print('yes')
else:
  print('no')

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

tsuru = (x-2*y)/2
kame = (4*y-x)/2
if tsuru < 0 or kame < 0:
  print('No')
elif (x-2*y)%2 == 0 and (4*y-x)%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())
if 2*x <= y <= 4 and y%2==0:
  print("Yes")
else:
  print("No")

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

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

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

if m/4<=n<=m/2 and m%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())
ans='No'
for i in range(x+1):
    j=x-i
    if 2*x+4*j==y:
        ans='Yes'
print(ans)

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

Verdicts: Wrong Answer

Accepted
Problem: There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs.  Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.

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

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

else:
    print('No')

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

if (Y % 2 == 0) and (4*X >= Y >=2*X):
    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):
n, l = list(map(int, input().split()))
#print(n,l)
minl, maxl = n * 2, n * 4
def fn(): return 'no' if l & 1 == 1 or l not in [i for i in range(minl, maxl+1, 2)] else 'yes'
print(fn())

n, l = list(map(int, input().split()))
minl, maxl = n * 2, n * 4
def fn(): return 'No' if l & 1 == 1 or l not in [i for i in range(minl, maxl+1, 2)] else 'Yes'
print(fn())


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())
Flag = False
for i in range(X+1):
    if i * 2 + 4 * (X - i + 1) == Y:
        Flag = True
        break

if Flag == True:
    print("Yes")
else:
    print("No")


X,Y = map(int,input().split())
Flag = False
for i in range(X+1):
    if i * 2 + 4 * (X - i) == Y:
        Flag = True
        break

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):
q=0
for a in range(x+1):
    s=0
    s+=a*2
    s+=(x-a)*4
    if s==y:
        q=1
        break

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

x,y=map(int,input('').split(' '))
q=0
for a in range(x+1):
    s=0
    s+=a*2
    s+=(x-a)*4
    if s==y:
        q=1
        break

if q==0:
    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):
# input
X, Y = map(int, input().split())


if Y in set([sum(p) for p in set(product([2, 4], repeat=X))]):
    print("Yes")
else:
    print("No")

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


if Y < 2 * X or Y > 4 * X or abs(Y - 2 * X) % 2 != 0:
    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):
a,b = map(int,input().split())
exist_flg = False
for kame in range(a+1):
  tsuru = a - kame
  if (kame*4+tsuru*2)==b:
    exist_flg = True
    break
if exist_flg:
  print("YES")
else:
  print("NO")

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

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"
if a in range(x+1):
  b=x-a
  a*2+b*4==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())

l = []
c = 2 * x
l.append(c)
for nn in range(x):
    c += 2
    l.append(c)
print(l)

flag = False
for ll in l:
    if ll == y:
        print("Yes")
        flag = False
        break

    else:
        flag = True

if flag:
    print("No")

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

l = []
c = 2 * x
l.append(c)
for nn in range(x):
    c += 2
    l.append(c)

flag = False
for ll in l:
    if ll == y:
        print("Yes")
        flag = False
        break

    else:
        flag = True

if 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().split())

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

print("NO")

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

for i in range(101):
    for j in range(101):
        if i + j == X and 2 * i + 4 * j == 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())

b = (Y - 2*X)/2
a = X - b
print(a, b)

is_int = (a.is_integer() and b.is_integer())
is_positive = (a >= 0 and b >= 0)
if is_int and is_positive and (a + b) == X and (2*a + 4*b) == Y:
    print("Yes")
else:
    print("No")


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

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

is_int = (a.is_integer() and b.is_integer())
is_positive = (a >= 0 and b >= 0)
if is_int and is_positive and (a + b) == X and (2*a + 4*b) == Y:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted