Problem:


Score : 200 points

Problem Statement

There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs.

Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.

Constraints

1 \leq X \leq 100

1 \leq Y \leq 100

All values in input are integers.

Input

Input is given from Standard Input in the following format:

X Y

Output

If there is a combination of numbers of cranes and turtles in which the statement is correct, print Yes; otherwise, print No.

Sample Input 1

3 8

Sample Output 1

Yes

The statement "there are 3 animals in total in the garden, and they have 8 legs in total" is correct if there are two cranes and one turtle. Thus, there is a combination of numbers of cranes and turtles in which the statement is correct.

Sample Input 2

2 100

Sample Output 2

No

There is no combination of numbers of cranes and turtles in which this statement is correct.

Sample Input 3

1 2

Sample Output 3

Yes

We also consider the case in which there are only cranes or only turtles.



Sample input:
3 8


Sample output:
Yes

Submission status: Wrong Answer

Solution code:
from sys import exit
X, Y = [int(x) for x in input().split()]

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

print('No')

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

Solution code:
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())

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
nums = input().split()
[X, Y] = list(map(int, nums))

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def solve(x, y):
	a = (4*x - y) / 2
	if a >=0 and a == int(a):
		return "Yes"
	return "No" 

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

Submission status: Wrong Answer

Solution code:
def solve(x, y):
	eq = 4*x - y
	if eq >= 0 and eq % 2 == 0:
		return "Yes"
	return "No" 

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

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

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

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

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

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())

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

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
if((y<(x*2)) or (y>(x*4))):
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
def main():
    x , y = map(int,input().split())
    if y%2==0 or y%4==0:
        roger = y//2
        roger1 = y//4
    else:
        return "No"
    if roger<=x or roger1<=x:
        return "Yes"
    else:
        return "No"
print(main())

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())#X:動物の数，Y:足の本数 2 or 4
ans = 0
if Y%2 == 0:
    for i in range(X):
        if 2*(X-i)+4*i == Y:
            ans = 1
            break

print('Yes' if ans==1 else 'No')

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())#X:動物の数，Y:足の本数 2 or 4
ans = 0
if Y%2 == 0:
    for i in range(X):
        if 2*(X-i)+4*i == Y:
            ans = 1
            break

print("Yes" if ans==1 else "No")

Submission status: Wrong Answer

Solution code:
a,b = map(int , raw_input().split())
"""
print a,b

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

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

y = a - x
-2x = b - 4a
"""

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

print 'Yes' if x + y == a and 2*x + 4 * y == b else 'No'

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin,stdout
LI=lambda:list(map(int,input().split()))
MAP=lambda:map(int,input().split())
IN=lambda:int(input())
S=lambda:input()
import math
from collections import Counter,defaultdict


x,y=MAP()
if x==1:
    print("Yes")
elif y<2*x or y>4*x or y%2:
    print("No")
elif y!=2*x or y!=4*x:
    print("Yes")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
from sys import stdin,stdout
LI=lambda:list(map(int,input().split()))
MAP=lambda:map(int,input().split())
IN=lambda:int(input())
S=lambda:input()
import math
from collections import Counter,defaultdict


x,y=MAP()
if y!=2*x or y!=4*x:
    print("Yes")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
x, y = map(int,input().split())
if y%2 == 1:
    print(-1)
else:
    for a in range(x+1):
        b = x-a
        if b == (y-(2*x))//2:
            print('Yes');break
    else:
        print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
if a*2 == b or a*4==b:
    print("Yes")
elif b%2==0 and 4*a-b>=0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
if a*2 == b or a*4==b:
    print("Yes")
elif 4*a-b>=0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
if a*2 == b or a*4==b:
    print("Yes")
elif a*4 > b > a*2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
if y>=2*x and y<=4*x and y%2==0:
    print("YES")
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
if y>=2*x and y<=4*x and y%6==0:
    print("YES")
else:
    print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
t = y/2 - x

if t < 0 or t%1 != 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
#170B
#Crane and Turtle

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    X, Y = map(int, input().split())
    turtle = (Y - X * 2) / 2
    if turtle.is_integer() and turtle <= X:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    X, Y = map(int, input().split())
    if (Y - X * 2) / 2 <= X:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    X, Y = map(int, input().split())
    if (Y - X * 2) / 2 < X:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())
v = Y-(2*X)
if v<0 or v%2==1:
  print('No')
elif 4*X > Y:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())
v = Y-(2*X)
if v<0 or v%2==1:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
 

t = (y - 2*x)//2

c = x - t
if (t >= 0 and c >=0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

if not f:
  print("No")

Submission status: Wrong Answer

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

if not f:
  print("No")

Submission status: Wrong Answer

Solution code:
x,y=input().split()
x
mat="No"
for i in range (1,101):
    for j in range(1,101):
        if i*2+j*4==int(y) and i+j==int(x):
            mat="Yes"

print(mat)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
s = 'No'
if 2 * x > y or 4 * x < y:
  s = 'No'
elif 2 * x == y or 4 * x == y:
  s = 'Yes'
elif (4*x - y) // 2 <= x and int((4*x - y) / 2) == (4*x - y) // 2:
  s = 'Yes'


print(s)

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
s = 'No'
if 2 * x > y or 4 * x < y:
  s = 'No'
elif int((4 * x - y) / 2) == (4*x - y) //2 and (4*x-y)//2 <= x:
  s = 'Yes'


print(s)

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
s = 'No'
if 2 * x > y or 4 * x < y:
  s = 'No'

if int((4 * x - y) / 2) == (4*x - y) //2 and (4*x-y)//2 <= x:
  s = 'Yes'

print(s)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys

X,Y = list(map(int, input().rstrip().split()))
#-----
crane = int( (4*X - Y) / 2 )
tortoise = int( (-2*X + Y) / 2 )

if crane == tortoise == 0:
    print("No")
    sys.exit()

if (0 <= crane <= 100) and (0 <= tortoise <= 100):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x,y = [int(i) for i in input().split()]
Y = y//2
t = Y - x
c = x - t
if (t > 0 and c > 0):
  print("Yes")
elif(t == 0 and c > 0):
  print("Yes")
elif(t > 0 and c == 0):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x,y = [int(i) for i in input().split()]
Y = y//2
t = Y - x
c = x - t
if (t > 0 and c >= 0):
    print("Yes")
elif(t == 0 and c > 0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
flag=0
for i in range(1,x+1):
  if (i*4+(x-i)*2)==y:
    print('Yes')
    flag=1
    break
    
if flag==0:
  print('No')

Submission status: Wrong Answer

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

Y = y//2

t = Y - x
c = x - t

if (t >= 0 and c >= 0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Y = y//2

t = Y - x
c = x - t

if (t > 0 and c > 0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
animal_num, leg_num = map(int, input().split())

crawn = 2
tutle = 4

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

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
c=math.ceil(a/2)
e=(a-c)*4
d=c*2
t=(a-c)*2
r=c*4
if e+d==b or t+r==b:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
c=math.ceil(a/2)
e=(a-c)*4
d=c*2
if e+d==b:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import math
a,b=map(int,input().split())
c=math.ceil(a/2)
e=(a-c)*4
d=c*2
if e==d:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split(' '))
result = False
for i in range(1,X+1):
    if 2*i + 4*(X-i) == Y:
        result = True
        print('Yes')
if not(result):
    print('No')

Submission status: Wrong Answer

Solution code:
X,Y = map(int, input().split())

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

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

Submission status: Wrong Answer

Solution code:
X,Y = map(int, input().split())

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

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
if a*2<=b and b<=4*a and b%2==0:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())

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

Submission status: Wrong Answer

Solution code:
x,y = map(int, input().split())

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())

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

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
ans = False
for i in range(0, 100):
    sum = 2 * (x - i) + 4 * i
    if sum == y:
        ans = True
    elif sum > y:
        break

print("Yes" if ans else "No")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
ans = False
for i in range(0, 100):
    sum = 4 * i + 2 * (x - i)
    if sum > y:
        break
    elif sum == y:
        ans = True

print("Yes" if ans else "No")

Submission status: Wrong Answer

Solution code:
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')

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

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

else:
  print('No')

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

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

else:
  print('No')

Submission status: Wrong Answer

Solution code:
x,y = input().split()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,l = map(int,input().split())

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

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())

ans = False

for c in range(1,x+1):
    t = x - c 
    LEG = 2*c + 4*t

    if LEG == y:
        ans = True
        break

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# atcoder 
# Türkler var mı?
# Herkese memnün oldum
import sys
import math

iimr = lambda: map(int, sys.stdin.readline().rstrip().split())
readline = sys.stdin.readline
sys.setrecursionlimit(10 ** 8)

kame = 4
tsuru = 2

def 関数(x, y):
    if (x * 4) < y or (x * 2) > y:
        return "No"
    else:
        # C'est possible de diviser le y
        for bx in range(0, x * 2):
            for ax in range(x * 4, 0, -1):
                if (bx + ax) == y:
                    return "Yes"
                    

def çözmek():
    X,Y = map(int, sys.stdin.readline().split())

    res = []
    res.append(関数(X,Y))
    print(*res, sep="\n")

if __name__ == "__main__":
    çözmek()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
p = []
ans = 0

for i in range(x):
    p.append(4)

for i in range(x):
    if sum(p)==y:
        ans = 1
        break
    else:
        p.remove(4)
        p.append(2)

if ans == 1:
    print('Yes')
else:
    if (y==2)&(x==1):
        print('Yes')
    if (y==4)&(x==1):
        print('Yes')
    else :
        print('No')

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
p = []
ans = 0

for i in range(x):
    p.append(4)

for i in p:
    if sum(p)==y:
        ans = 1
        break
    else:
        p.remove(4)
        p.append(2)

if ans == 1:
    print('Yes')
else:
    if (y==2)&(x==1):
        print('Yes')
    elif (y==4)&(x==1):
        print('Yes')
    else :
        print('No')

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
p = []
ans = 0

for i in range(x):
    p.append(4)

for i in range(x):
    if sum(p)==y:
        ans = 1
        break
    else:
        p.remove(4)
        p.append(2)

if ans == 1:
    print('Yes')
else:
    if (y==2)&(x==1):
        print('Yes')
    elif (y==4)&(x==1):
        print('Yes')
    else :
        print('No')

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
p = []
ans = 0

for i in range(x):
    p.append(4)

for i in range(x):
    if sum(p)==y:
        ans = 1
        break
    else:
        p.remove(4)
        p.append(2)

if ans == 1:
    print('Yes')
else:
    if (y==2)&(x==1):
        print('Yes')
    else :
        print('No')

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
p = []
ans = 0

for i in range(x):
    p.append(4)

for i in range(x):
    if sum(p)==y:
        ans = 1
        break
    else:
        p.remove(4)
        p.append(2)

if ans == 1:
    print('Yes')
else:
    if y==2:
        print('Yes')
    else :
        print('No')

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
p = []
ans = 0

for i in range(x):
    p.append(4)

for i in range(x):
    if sum(p)==y:
        ans = 1
        break
    else:
        p.remove(4)
        p.append(2)

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

Submission status: Wrong Answer

Solution code:
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")

Submission status: Wrong Answer

Solution code:
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")
elif all_kame%2 == 0:
    print("Yes")

Submission status: Wrong Answer

Solution code:
X, Y = [int(num) for num in input().split()]
b = (Y - 2*X) / 2
if int(b) == b:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())

#yをxこの2,4の組み合わせで記述できるか
#yを4で割った余りが0か2で
#あまり無し商<=x あまりあり商＋１<=x
#2で割った時、余りが0且つ商をnとするとn/2(切り上げ)>=x

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

Submission status: Wrong Answer

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

#yをxこの2,4の組み合わせで記述できるか
#yを4で割った余りが0か2で
#あまり無し商<=x あまりあり商＋１<=x
#2で割った時、余りが0且つ商をnとするとn/2(切り上げ)>=x

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

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))

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

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))

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

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))

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

Submission status: Wrong Answer

Solution code:
def pair(parameter):
        result = []
        for i in range(len(parameter)):
                for val in range(i+1,len(parameter)):
                        result.append([parameter[i],parameter[val]])
        return result
x, y = map(int, input().split())
l=[]
for i in range(x+1):
    l.append(i)
pairing = pair(l)
c=0
ans="No"
for m in pairing:
    for iterater in m:
        valueX=(m[0]*4)+(m[1]*2)
        valueY=(m[0]*2)+(m[1]*4)
        if valueX==y:
            ans= "Yes"
        if valueY==y:
            ans="Yes"
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
ans = "No"

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

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10 ** 9)
# input = sys.stdin.readline    ####
def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')
# from math import ceil, floor, log2
# from collections import deque
# from itertools import combinations as comb, combinations_with_replacement as comb_w, accumulate, product, permutations
# from heapq import heapify, heappop, heappush
# import numpy as np
# from numpy import cumsum  # accumulate

def solve():
    X, Y = MI()

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

if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:
X,Y = list(map(int, input().split()))
print("Yes" if (Y - X * 2) % 2 == 0 and (Y - X * 2) // 2 <= X else "No")

Submission status: Wrong Answer

Solution code:
# x: heads, y: legs
x, y = map(int, input().split())

tmp_legs = x * 4
diff = tmp_legs - y

if diff < 0:
    print("No")
    exit()
elif diff == 0:
    print("Yes")
    exit(0)

head_crane = diff//2

if diff/2 - head_crane != 0:
    print("No")
    exit()

print("Yes")

Submission status: Wrong Answer

Solution code:
# x: heads, y: legs
x, y = map(int, input().split())

tmp_legs = x * 4
diff = tmp_legs - y

if diff <= 0:
    print("No")
    exit()

head_crane = diff//2

if diff/2 - head_crane != 0:
    print("No")
    exit()

print("Yes")

Submission status: Wrong Answer

Solution code:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())

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

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

Submission status: Wrong Answer

Solution code:

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

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

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

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

if (X == 1 and Y == 2) or (X == 1 and Y == 4):
    print('Yes')
else:
    c = Y - 4

    while c > 0:
        if c - 8 < 0:
            break
        c -= 8
    
    if c == 4:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())

if (X == 1 and Y == 2) or (X == 1 and Y == 4):
    print('Yes')
else:
    c = 0.5 * ( Y - 4 )

    while c > 0:
        if c - 4 < 0:
            break
        c -= 4

    if c == 2:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
b = (y-2*x)/2
a = x - b
if type(b) == int and b>=0:
  if type(a) == int and a>=0:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
b = (y-2*x)/2
if type(b) == int and b>=0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
X, Y = map(int,input().split())
ans = 'No'
if 4*X < Y:
    print(ans)
else:
    for i in range(1,X+1):
        crane = i
        turtle = X - i
        if 2*crane + 4*turtle == Y:
            ans = 'Yes'
            break
    print(ans)

Submission status: Wrong Answer

Solution code:
# 170 B

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

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

print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    X, Y = map(int, input().split())
    remain = Y - 2 * X
    ans = True
    if remain % 2 != 0:
        ans = False
    if remain//2 > X:
        ans = False
    print('Yes' if ans else 'No')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
X,Y = map(int, input().split())

var=Y-2*X
var2=var/2
var3=X-4*Y
if var3<0:
    print("No")
elif  var2.is_integer()==True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect

def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    x, y = LI()
    kame = (y - (x * 2)) // 2
    turu = x - kame
    if kame >= 1 or turu >= 1:
        print('Yes')
    else:
        print('No')
    return


if __name__ == "__main__":
    solve()