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())
ans = 'No'
for i in range(x+1):
  tu = i
  cr = x - i
  ch = tu*4 + cr*2
  print(i,ch)
  if ch == y:
    ans = 'Yes'
    break
print(ans)

x,y = map(int,input().split())
ans = 'No'
for i in range(x+1):
  tu = i
  cr = x - i
  ch = tu*4 + cr*2
  if ch == 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):
a,b= map(int,input().split())

t = b//a
if a ==1 and b == 1:
    print("NO")
elif a == 1 and b ==2:
    print("YES")
elif t <= a:
    print("YES")
else:
    print("NO")


#from itertools import Combinations
a,b = map(int,input().split())
x = 'No'
for i in range(a+1):
    t = a - i
    if 2 * i + 4 * t == b:
        x = "Yes"
print(x)


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
if crain.is_integer() and crain > 0:
    crain = int(crain)
    print("yes")
else:
    print("no")

X=int(input())
Y=int(input())

crain=(4*X-Y)/2
if crain.is_integer() and crain>0:
    crain = int(crain)
    print("Yes")
else:
    print("No")

X=input()
Y=input()
crain = (4 * X - Y) / 2
if crain.is_integer() and crain > 0:
    crain = int(crain)
    print("yes")
else:
    print("no")

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

if(Y%2==1):
    q=1
    print("No")

if q==0:
    print(X*2<=Y and Y<=X*4 and "Yes" or "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):
a = y//4
if 2*(x-a)==y-4*a:
  print("Yes")
else:
  print("No")

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

a = y//4
if 2*(x-a)==y-4*a:
  print("YES")
else:
  print("NO")

x, y = map(int, input().split())
n = (4*x-y)/2
m = (y-2*x)/2
if y%2 ==1:
  print("No")
else:
  if n <0 or m <0:
    print("No")
  else:
    if n+m==x and 2*n+4*m==y:
      print("Yes")
    else:
      print("No")

Verdicts: Runtime Error

Wrong Answer

Runtime Error

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

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


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

X, Y = map(int, sys.stdin.readline().split())

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

import sys

X, Y = map(int, sys.stdin.readline().split())

for x in range(X+1):
    kame = x
    tsuru = X - x
    
    if kame*4+tsuru*2==Y:
        print("yes")
        break
else:
    print("no")

import sys

X, Y = map(int, sys.stdin.readline().split())

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

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



import sys
def Ii():return int(sys.stdin.readline())
def Mi():return map(int,sys.stdin.readline().split())
def Li():return list(map(int,sys.stdin.readline().split()))

x,y = Mi()
if y%2 == 1:
  print('No')
  exit(0)
  
y = y//2

if 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):
x,y = map(int, input().split())
a = 0
b = 0
flag = True
while flag:
    for a in range(x+1):
        print(a)
        for b in range(x+1):
            if x - a == b and y - 2*a == 4*b:
                flag = False
                print(a,b,x,y)
                break
            else:
                continue
    break

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

x,y = map(int, input().split())
a = 0
b = 0
flag = True
while flag:
    for a in range(x+1):
        print(a)
        for b in range(x+1):
            if x - a == b and y - 2*a == 4*b and b != 0 and a != 0:
                flag = False
                print(a,b,x,y)
                break
            else:
                continue
    break

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

x,y = map(int, input().split())
a = 0
b = 0
flag = True
while flag:
    for a in range(x+1):
        for b in range(x+1):
            if x - a == b and y - 2*a == 4*b:
                flag = False
                break
            else:
                continue
    break

if flag:
    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):
from sys import stdin

def main():

    input = stdin.readline

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

    max_ashi = X * 4
    min_ashi = X * 2

    if (Y <= max_ashi) & (min_ashi <= Y) & (Y % 2 == 0):
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
    main()

from sys import stdin

def main():

    input = stdin.readline

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

    max_ashi = X * 4
    min_ashi = X * 2

    if (Y <= max_ashi) & (min_ashi <= Y) & (Y % 2 == 0):
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Verdicts: Wrong Answer

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

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

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

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

for i in range(1, n+1):
    f = 2 * i + 4 * (n - i)
    if f == m:
        print('Yes')
        break
    
    else:
        print('No')

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

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

if 2 > leg / all or leg / all > 4 or leg % 2 == 1:
  print("NO")
else:
  print("YES")


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

if 2 > leg / all or leg / all > 4 or leg % 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):
import sys
readline = sys.stdin.readline

def solve():
    X, Y = map(int, readline().split())

    Y - X * 2 = a

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

solve()

import sys
readline = sys.stdin.readline

def solve():
    X, Y = map(int, readline().split())

    a = Y - X * 2

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

solve()

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):
  for j in range(X+1):
    if 2*i+4*j==Y and i+j == X:
      print('Yes')
      break
    elif i == X and j == X:
        print('No')
      
  

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

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

x,y=map(int,input().split())  
p=(y-2x)/2
if int(p) and 1<=p<=100 :
    print("Yes")
else :
    print("No")

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

Verdicts: Runtime Error

Runtime Error

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

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

ans = 'No'

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


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

ans = 'No'

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


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

ans = 'No'

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


ans = 'NO'
if 2 * x <= y <= 4 * x and y % 2 == 0:
    ans = 'YES'

print(ans)


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

ans = 'No'
if 2 * x <= y <= 4 * x and y % 2 == 0:
    ans = 'Yes'

print(ans)


Verdicts: Wrong Answer

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

Submission attempts (in order):
x, y = map(int, input().split())
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 i in range(x + 1):
    if 2 * (x - i) + 4 * 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):
x, y = list(map(int,input().split()))
ans = y / 2 - x 
if ans % 2 != 0:
    print("No")
elif x == y or x >= y or ans >= x:
    print("No")
elif ans <= x:
    print("Yes")

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


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


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


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

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

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

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

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

Verdicts: Runtime Error

Runtime Error

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

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


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


Verdicts: Wrong Answer

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

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

x, y = map(int,input().split())
flag=False
for i in range(x+1):
  yi=2*i+4*(x-i)
  if y==yi:
    flag=True
    break
    
print("Yes") if flag 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())
t=0
if(y>4*x):
  print("NO")
elif(y==2*x or y==4*x):
  print("YES")
else:  
  for i in range(x+1):
    j=x-i
    if((2*i+4*j)==y):
      print("YES")
      break
    else:
      t=t+1
  if(t==x+1):
    print("NO")

x,y=map(int,input().split())
t=0
if(y>4*x):
  print("NO")
elif(y==2*x or y==4*x):
  print("YES")
elif(y%2!=0):
    print("NO")
else:  
  for i in range(1,x):
    j=x-i
    if((2*i+4*j)==y):
      print("YES")
      break
    else:
      t=t+1
  if(t==x-1):
    print("NO")


x,y=map(int,input().split())
t=0
if(y>4*x or y<2*x):
  print("No")
elif(y==2*x or y==4*x):
  print("Yes")
elif(y%2!=0):
    print("No")
else:  
  for i in range(1,x):
    j=x-i
    if((2*i+4*j)==y):
      break
    else:
      t=t+1
  if(t==x-1):
    print("No")
  else:
      print("Yes")

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
pyenv shell 3.8.0
dyld: Library not loaded: /usr/local/opt/libevent/lib/libevent-2.1.6.dylib
  Referenced from: /usr/local/bin/tmux
  Reason: image not found
[2]    51266 abort      tmux
% pyenv shell 3.8.0                                                   ~/Documents/sub-programming/atcoder
pyenv: shell integration not enabled. Run `pyenv init' for instructions.
% python 170a.py                                                      ~/Documents/sub-programming/atcoder
0 2 3 4 5
Traceback (most recent call last):
  File "170a.py", line 3, in <module>
    if h[i] == 0:
IndexError: list index out of range
% python 170a.py                                                      ~/Documents/sub-programming/atcoder
0 2 3 4 5
1
% python                                                              ~/Documents/sub-programming/atcoder
Python 3.8.0 (default, Dec  6 2019, 13:22:27) 
[Clang 8.0.0 (tags/RELEASE_800/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> int(2,1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: int() base must be >= 2 and <= 36, or 0
>>> int(2.1)
2
>>> int(2.4)
2
>>> type(2.1)
<class 'float'>
>>> math.ceil(2.1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'math' is not defined
>>> 1.ceil()
  File "<stdin>", line 1
    1.ceil()
      ^
SyntaxError: invalid syntax
>>> 
KeyboardInterrupt
>>> eix
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'eix' is not defined
>>> exit
Use exit() or Ctrl-D (i.e. EOF) to exit
>>> 
% python 170b.py                                                      ~/Documents/sub-programming/atcoder
  File "170b.py", line 5
    print('Yes'):
                ^
SyntaxError: invalid syntax
% python 170b.py                                                      ~/Documents/sub-programming/atcoder
3 8
Yes
%                                                                     ~/Documents/sub-programming/atcoder

import math
x, y = map(int, input().split())
a = (4 * x - y) / 2
if a >= 0 and a <= x and a == math.ceil(a):
    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(" "))
z = y/2-x
if z>=0 and z<=x:
  print("yes")
else:
  print("no")

x,y = map(int, input().split(" "))
z = y/2-x
if z>=0 and z<=x and z%1==0:
  print("yes")
else:
  print("no")

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

Verdicts: Wrong Answer

Wrong Answer

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

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

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


Verdicts: Runtime Error

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

if (y-2*x)/2 <= x:
  print('Yes')
else:
  print('No')

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


Verdicts: Runtime Error

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

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

a = x[0]*2 - x[1]/2
b = -x[0]/2 + x[1]/2

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


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

a = x[0]*2 - x[1]/2
b = -x[0]/2 + x[1]/2

if a>=0 and b>= 0:
	if(isinstance(a, int) and isinstan(b, int)):
		print("yes")
	else:
		print("no")
else:
	print("no")
	 


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

a = x[0]*2 - x[1]/2
b = -x[0]/2 + x[1]/2

if a>=0 and b>= 0:
	if(a.isinteger() and b.isinteger()):
		print("yes")
	else;
		print("no")
else:
	print("no")
	 


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

a = x[0]*2 - x[1]/2
b = -x[0] + x[1]/2

if (a>=0 and b>= 0):
	if(a.is_integer() and b.is_integer()):
		print("yes")
	else:
		print("no")
else:
	print("no")
	 

x = list(map(int, xin))

a = x[0]*2 - x[1]/2
b = -x[0]/2 + x[1]/2

if a>=0 and b>= 0:
	print("yes")
else:
	print("no")

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

a = x[0]*2 - x[1]/2
b = -x[0] + x[1]/2

if (a>=0 and b>= 0):
	if(a.is_integer() and b.is_integer()):
		print("Yes")
	else:
		print("No")
else:
	print("No")
	 

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

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

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

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


if __name__ == '__main__':
    main()

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

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


if __name__ == '__main__':
    main()

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

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


if __name__ == '__main__':
    main()

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

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


if __name__ == '__main__':
    main()

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

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

Submission attempts (in order):
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
INF = 1000000000000

x,y = LI()

flg = False
for i in range(x+1):
    val = 2 * i + 4 * (x-i)
    if(val == y):
        flg = True
        break

if(flg):
    print('YES')
else:
    print('NO')

import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
INF = 1000000000000

x,y = LI()

flg = False
for i in range(x+1):
    val = 2 * i + 4 * (x-i)
    if(val == y):
        flg = True
        break

if(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())
count = 0

for a in range(x+1):
  b = x - a
  if y = a * 2 + b * 4:
    count += 1
if count == 0:
  print("No")
else:
  print('Yes')

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

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

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

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):
a,b = map(int, input().split())
i = 0
while i<=a:
  turu = 2*(a-i)
  kame = 4*i
  
  if b == turu:
    print('YES')
    
  if b == kame:
    print('YES')
  
  amari = b - turu
  if amari == 0:
    print('YES')
    break

  if kame !=0:
    if amari % kame == 0:
      print('YES')
      break
      
  i = i + 1
  
else:
  print('No)

a,b = map(int, input().split())
i = 0
while i<=a:
  turu = 2*(a-i)
  kame = 4*i
  amari = b - turu
  
  if b == turu:
    print('YES')
    
  if b == kame:
    print('YES')
  
  
  if amari == 0:
    print('YES')
    break

  if kame!=0:
    if amari % kame == 0:
      print('YES')
      break
      
  i = i + 1
  
else:
  print('No')

a,b = map(int, input().split())
i = 0
while i<=a:
  turu = 2*(a-i)
  kame = 4*i
  
  if b == turu:
    print('YES')
    break
    
  if b == kame:
    print('YES')
    break
  
  amari = b - turu
  if amari == 0:
    print('YES')
    break

  if kame !=0:
    if amari % kame == 0:
      print('YES')
      break
      
  i = i + 1
  
else:
  print('No')

a,b = map(int, input().split())
i = 0
while i<a:
  turu = 2*(a-i)
  kame = 4*i
  
  amari = b % turu
  if amari == 0:
    print('YES')
    break

  if kame !=0:
    if amari % kame == 0:
      print('YES')
      break
      
  i = i + 1
  
else:
  print('No)
      
      

a,b = map(int, input().split())
i = 0
while i<=a:
  turu = 2*(a-i)
  kame = 4*i
  
  if b == turu:
    print('YES')
    break
    
  if b == kame:
    print('YES')
    break
  
  amari = b - turu

  if kame != 0:
    if amari - kame == 0:
      print('YES')
      break
      
  i = i + 1
  
else:
  print('No')

a,b = map(int, input().split())
i = 0
while i<=a:
  turu = 2*(a-i)
  kame = 4*i
  ans = turu + kame
  if ans == b:
    print('Yes')
    break
  i = i + 1
  
else:
  print('No')

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

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

Submission attempts (in order):
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    x, y = map(int, input().split())
    for i in range(x + 1):
        num = ((2 * i) + (4 * (x - i)))
        if y == num:
            print('yes')
            exit()
    print('No')

if __name__ == '__main__':
    main()


import sys
input = lambda: sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()


Verdicts: Wrong Answer

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

Submission attempts (in order):
x, y = map(int, input().split())
res = "NO"
for i in range(x + 1):
    for j in range(x + 1 - i):
        if 2 * i + 4 * j == y:
            res = "YES"
            
print(res)

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

res = "No"
for i in range(51):
    for j in range(26):
        if (2 * i + 4 * j == y) and (i + j == x):
            res = "Yes"
            
print(res)

Verdicts: Wrong Answer

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

Submission attempts (in order):
a,b = map(int,input().split())
c="入力が間違っています。"
d="鶴が"
e="匹で、亀が"
f="匹です。"

k=b//2-a
t=2*a-b//2
if k<0 or t<0 or b%2!=0:
    print('Yes')
else:
    print('No')

n,t = list(map(int,input().split()))

m = 0
while m < n+1:
	if m*4 + (n-m)*2 == t:
      print('Yes')
      break
      
    m += 1
    
if m == (n+1):
  print('No')

a,b = map(int,input().split())
c="入力が間違っています。"
d="鶴が"
e="匹で、亀が"
f="匹です。"
 
k=b//2-a
t=2*a-b//2
if k<0 or t<0 or b%2!=0:
    print('No')
else:
    print('Yes')

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

for i in range(a+1):
  if 2*(i+a) == b:
    print("Yes")
  else :
    print("No")

a,b = map(int,input().split())
c = 0
d = ["No","Yes"]

for i in range(a+1):
  if 2*(i+a) == b:
    c = 1 

print(d[c])
 

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

if n == 0:
  print(x)
else :
  pn = [int(num) for num in input().split()]
  answers = {}
  for i in range(0,101):
    if not i in pn:
      answers[i] = abs(i-x)
  print(min(answers, key=answers.get))

x, y = map(int, input().split())
 
check = True
for i in range(x+1) :
  if (i*2+(x-i)*4) == y :
    print("Yes")
    check = False
    break
  
if check :
  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 math
import random;
from collections import defaultdict 
mod =1000000007
r1 = lambda : int(input());
rm = lambda : map(int,input().split());
rms = lambda : map(str,input().split());
rls = lambda : list(rm())

def solve():
    a,l = rm();
    if(a*4>=l and a*2>=l and l%2==0):
        print("Yes");
    else:
        print("No")
        
        





def def_value(): 
	return "nan"
	
solve();





import math
import random;
from collections import defaultdict 
mod =1000000007
r1 = lambda : int(input());
rm = lambda : map(int,input().split());
rms = lambda : map(str,input().split());
rls = lambda : list(rm())

def solve():
    a,l = rm();
    if(a*4>=l and a*2<=l and l%2==0):
        print("Yes");
    else:
        print("No")
        
        





def def_value(): 
	return "nan"
	
solve();



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):
    ii = x - i
    if i * 2 + 4 * ii == y:
        ans = 'Yes'
    else:
        ans = 'No'
print (ans)

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

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
print("Yes" if (lambda x: x[0] * 2 <= x[1] <= x * 4)(list(map(int,input().split()))) else "No")

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


Verdicts: Runtime Error

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

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

for i in range(x):
    if i % 2 == 0:
            z +=4
    else:
            z +=2
    if z == y :
        print("Yes")
    elif z==(y-2):
        print("Yes")
    else:
        print("No")

X,Y = map(int,input().split())
e = 0
temp_X = X
if Y%2 != 0:
    print("No")
    quit()
else:
    while temp_X >= 0:
        i = (temp_X*2) + (e*4)
        if i == Y:
            print("Yes")
            quit()
        temp_X -= 1
        e += 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 = map(int, input().split())

all_kame = y - 2*x
#print(type(all_kame))
if all_kame < 0:
    print("No")
elif all_kame == 0:
    print("Yes")
else:
    for i in range(x+1):
        if all_kame - 2*(x-i) ==0:
            print("Yes")
            break
    print("No")

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

all_kame = y - 2*x
#print(type(all_kame))
if all_kame < 0:
    print("No")
elif all_kame == 0:
    print("Yes")
else:
    for i in range(x+1):
        if all_kame - 2*i ==0:
            print("Yes")
        else:
            print("No")

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

all_kame = y - 2*x
#print(type(all_kame))
if all_kame < 0:
    print("No")
    
elif all_kame == 0:
    print("Yes")
    
else:
    for i in range(x+1):
        if all_kame - 2*(x-i) ==0:
            print("Yes")
            exit()
    print("No")

Verdicts: Wrong Answer

Wrong Answer

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

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

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

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

flg = True

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

Verdicts: Runtime Error

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

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

if Y % 2 == 2 or Y - 2*X < 0 or 4 * X - Y < 0:
  print('NO')
else:
  print('YES')

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

if Y % 2 == 1 or Y - 2*X < 0 or 4 * X - Y < 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):
doubutsu, ashi = input().strip().split()



doubutsu = int(doubutsu)
ashi = int(ashi)

kame = (ashi-2*doubutsu)/2
tsuru = doubutsu - kame

if type(kame) == int and type(tsuru) == int:
    if kame >= 0 and tsuru >= 0:
        print("Yes")
    else:
        print("No")
else:
    print("No")

xn = input().split()
data_str = input().split()
data = [int(s) for s in data_str] 

data_2 = []

x = int(xn[0]) 
data.sort() 

print(data)


a = x-1
while True:
    #check
    for i in range(data):
        if data[i] == a:
            a = a - 1
        else:
            data_2.append(a)
            break
    if a == int(data_2[0]):
        break


b = x + 1
while True:
    #check
    for i in range(data):
        if int(data[i]) != b:
            data_2.append(b)
            print("bの値{}".format(b))
            break
        else:
            b = b + 1
            break
    if b == int(data_2[1]):
        break


if abs(x-a) < abs(b-x):
    print(a)
else:
    print(b)

doubutsu, ashi = input().split()




kame = (ashi-2*doubutsu)/2
tsuru = doubutsu - kame

if type(kame) == int and type(tsuru) == int:
    if kame >= 0 and tsuru >= 0:
        print("Yes")
    else:
        print("No")
else:
    print("No")

listt = input().split()



doubutsu = int(listt[0])
ashi = int(listt[1])

kame = (ashi-2*doubutsu)/2
tsuru = doubutsu - kame

if type(kame) == int and type(tsuru) == int:
    if kame >= 0 and tsuru >= 0:
        print("Yes")
    elif kame == 0 and tsuru == 0;
        print('No')
    else:
        print("No")
else:
    print("No")

listt = input().split()



doubutsu = int(listt[0])
ashi = int(listt[1])

kame = (ashi-2*doubutsu)/2
tsuru = doubutsu - kame

if type(kame) == int and type(tsuru) == int:
    if kame >= 0 and tsuru >= 0:
        print("Yes")
    else:
        print("No")
else:
    print("No")

listt = input().split()

doubutsu = int(listt[0])
ashi = int(listt[1])

kame = (ashi-2*doubutsu)/2
tsuru = doubutsu - kame

if ashi%2 == 0 and kame >= 0 and tsuru >= 0:
    print('Yes')
else:
    print("No")




Verdicts: Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

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

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

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

Verdicts: Runtime Error

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

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

Verdicts: Runtime Error

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

Submission attempts (in order):
import sys
X, Y = map(int,input().split())
list1 = []
list2 = []

for x in range(0,101):
  for y in range(0,101):
    list1.append(x+y)
    list2.append(2*x+4*y)


for i in list1:
  if list1[i] == X and list2[i] == Y:
    print('Yes')
    sys.exit()
print('No')

import sys
X, Y = map(int,input().split())
list1 = []
list2 = []

for x in range(0,101):
  for y in range(0,101):
    list1.append(x+y)
    list2.append(2*x+4*y)


for i in range(len(list1)):
  if list1[i] == X and list2[i] == Y:
    print('Yes')
    sys.exit()
print('No')

Verdicts: Wrong Answer

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

Submission attempts (in order):
X, Y = map(int, input().split()) ans = 'No'
for 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)

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

Wrong Answer

Accepted