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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X, Y = [int(v) for v in input().rstrip().split()]

r = 'No'
if Y % 2 == 0:
    cranenum = 2 * X
    if cranenum <= Y:
        r = 'Yes'

print(r)

Submission status: Wrong Answer

Solution code:
X, Y = [int(v) for v in input().rstrip().split()]

r = 'No'
if Y % 2 == 0:
	cranenum = 2 * X
	if cranenum >= Y:
		r = 'Yes'

print(r)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

x = 2*X-1/2*Y
y = -X + 1/2*Y

if x.is_integer() and y.is_integer() == True:
  if x >= 0 and y >= 0:
    print('Yes')
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())

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print("Yes" if x >=1 and y >= 2*x and y <= 4*x and x <= 25 else "No")

Submission status: Wrong Answer

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

print("Yes" if x >=1 and y >= 2*x and y <= 4*x else "No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print("yes" if y >= 2*x and y <= 4*x else "no")

Submission status: Wrong Answer

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

print('yes' if y >= 2*x and y <= 4*x else 'no')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print('No')

Submission status: Wrong Answer

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

print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print('No')

Submission status: Wrong Answer

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

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:
q,all_c = map(int,input().split())
crane = 2
turtle=4

if q * (turtle*2) < all_c:
    print('No')
    
elif all_c >= turtle:
    turtle_1 = (turtle*q) // all_c  
    crane_1= ((turtle*q) % all_c)//crane
    print('Yes')
    
elif all_c < turtle:
    turtle_1 = 0
    crane_1 = all_c //crane
    print('Yes')

Submission status: Wrong Answer

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

ans = "No"

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

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
#(1)式の条件が成り立つか判断
if (2*x - 0.5*y) >= 0 and y % 2 == 0 :
    turu = int(2*x -0.5*y)
    kame = int(x - turu)
    print('Yes')
else :
    print('No')

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())
for i in range(X):
    i=int(i)
    x=[]
    if Y==2*i+4*(X-i):
        x.append("Yes")
    else :
        x.append("No")
Strx="".join(x)
print(Strx)

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())
for i in range(X):
    i=int(i)
    x=[]
    if Y==2*i+4*(X-i):
        x.append("Yes")
    else :
        x.append("No")
print(str(x))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if (y % 2) != 0:
    print('No')
    exit()

for i in range(x+1):
    for j in range(x-i+1):
        if i + (j * 2) == (y//2):
            print('Yes')
            exit()
print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if y % 2 != 0 or x >= y:
    print("No")
elif y == x*2 or y == x*4:
    print("Yes")
elif (y - (x*2))%4 == 0 and x*4 == (y - (x*2)):
    print('Yes')
elif (y - (x*4))%2 == 0 and x*2 == (y - (x*4)):
    print('Yes')
else:
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
if(m%2==1):
    print("No")
elif(2*n<=m and m>=4*n):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
if(m%2==1):
    print("No")
elif(2*n>=m and m<=4*n):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

crane = 2*X - Y/2
turtle = Y/2 - X

print(['No', 'Yes'][crane >= 0 and turtle >= 0 and abs(crane) + abs(turtle) > 0])

Submission status: Wrong Answer

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

crane = 2*X - Y/2
turtle = Y/2 - X

print(['No', 'Yes'][crane + turtle > 0])

Submission status: Wrong Answer

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

crane = 2*X - Y/2
turtle = Y/2 - X

print(['No', 'Yes'][crane >= 0 and turtle >= 0])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
XY = input().split()
X = int(XY[0])
Y = int(XY[1])
l = []
for i in range(X+1):
    for j in range (X+1):
        if (4*i + 2*j) == Y:
            l.append("Yes")
        else:
            l.append("No")
if l.count("Yes") > 0:
    print("Yes")
else:
    print("No")
        #print(str(i) + "," + str(j))

Submission status: Wrong Answer

Solution code:
XY = input().split()
l = []
for i in range(int(XY[0])+1):
    for j in range(int(XY[0])+1):
        if (4*i + 2*j) == int(XY[1]):
            l.append("Yes")
        else:
            l.append("No")
if l.count("Yes") > 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
XY = input().split()
tk = ""
l = []
for i in range(int(XY[0])+1):
    for j in range(int(XY[0])+1):
        if (4*i + 2*j) == int(XY[1]):
            l.append("Yes")
        else:
            l.append("No")
        #print(4*i + 2*j)
if l.count("Yes") > 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
XY = input().split()
tk = ""
l = []
for i in range(int(XY[0])):
    for j in range(int(XY[0])+1):
        if (4*i + 2*j) == int(XY[1]):
            l.append("Yes")
        else:
            l.append("No")
        #print(4*i + 2*j)
if l.count("Yes") > 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
XY = input().split()
tk = ""
l = []
for i in range(int(XY[0])):
    for j in range(int(XY[0])):
        if (4*i + 2*j) == int(XY[1]):
            l.append("Yes")
        else:
            l.append("No")
if l.count("Yes") > 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
XY = input().split()
tk = ""
for i in range(int(XY[0])):
    for j in range(int(XY[0])):
        if (4*i + 2*j) == int(XY[1]):
            print("Yes")
            break
    else:
        print("No")
        break

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())
now = 4*X
end = 2*X
while(now>end):
    if now==Y:
        print("Yes")
        exit()
    now-=2
print("No")

Submission status: Wrong Answer

Solution code:
# Crane and Turtle
X,Y=map(int,input().split())
def solve(X, Y):
    return (2*X - (1/2)*Y, -X + (1/2)*Y)
a, b = solve(X, Y)
ans = ['No', 'Yes'][(a>=0)&(b>=0)]
print(ans)

Submission status: Wrong Answer

Solution code:
# Crane and Turtle
X,Y=map(int,input().split())
a = 2*X - (1/2)*Y
b =  -X + (1/2)*Y
ans = ['No', 'Yes'][((a > 0) & (b >= 0))|((a>=0)&(b>0))]
print(ans)

Submission status: Wrong Answer

Solution code:
# Crane and Turtle
X,Y=map(int,input().split())
a = 2*X - (1/2)*Y
b =  -X + (1/2)*Y
ans = ['No', 'Yes'][(a >= 0) & (b >= 0)]
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x,y = list(map(int,input().split()))
if (-(-y//4)) <= x:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

if Y % 2 != 0 :
  print('No')
elif X > Y :
  print('No')
elif X * 4 < Y :
  print ('No')
else :
  print('Yes')

Submission status: Wrong Answer

Solution code:
x,y = map(int, input().split(' '))
if y % 2 == 1:
    print('NO')
elif y//4 > x:
    print('NO')
else:
    print('YES')

Submission status: Wrong Answer

Solution code:
x,y = map(int, input().split(' '))
if x % 2 == 1:
    print('NO')
elif y//4 > x:
    print('NO')
else:
    print('YES')

Submission status: Wrong Answer

Solution code:
x,y = map(int, input().split(' '))
if (x*2 == y) or (x*4 == y):
    print('YES')
elif y % 2 == 1:
    print('NO')
elif x > (y//4):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
if y//x==2:
  print("Yes")
elif y//x==4:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0

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

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

Submission status: Wrong Answer

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

ans = 0

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

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

Submission status: Wrong Answer

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

ans = 0

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

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

Submission status: Wrong Answer

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

ans = 0

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
s=0
for i in range(1,x):
    if y-x>=4:
      s=s+4
    if y-x<4:
      s=s+2
if s==y:
  print("Yes")
elif x==1 and y==2:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
lst = []
ans = 'No'

for i in range(x):
  lst.append(2)
print(lst)

for i in range(x):
  if sum(lst) == y:
    ans = 'Yes'
    break
  else:
    lst[i] = 4
    
if sum(lst) == y:
    ans = 'Yes'
    
print(ans)

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
lst = []
ans = 'No'

for i in range(x):
  lst.append(2)

for i in range(x):
  if sum(lst) == y:
    ans = 'Yes'
    break
  else:
    lst[i] = 4

print(ans)

Submission status: Wrong Answer

Solution code:
x=input()
lst=x.split(" ")
lstr=[]
for a in lst:
    lstr.append(int(a))
X=lstr[0]
Y=lstr[1]
if(Y%2==1):
    print('no')
else:
    if(Y/X<=4 and Y/X>=2):
        print('Yes')
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
given = input()

data = given.strip().split()
X = int(data[0])
Y = int(data[1])

i = 0
ashi = 0
while (i < X):
    ashi = 2 * (X - i) + 4 * i
    if ashi == Y:
        print("Yes")
        break
    i = i + 1

if i == X:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys

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

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

print('No')

Submission status: Wrong Answer

Solution code:
import sys

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

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

print('No')

Submission status: Wrong Answer

Solution code:
x, y = map(int,input().split())
min = 2 * x
gap = y - min

if gap < 0 & gap > min:
  print("No")
else:
  if gap % 2 == 0:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
x, y = map(int,input().split())
gap = 4 * x - y

if gap < 0 & gap > 200:
  print("No")
else:
  if gap % 2 == 0:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
x, y = map(int,input().split())
gap = 4 * x - y

if gap < 0:
  print("No")
else:
  if gap % 2 == 0:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

def check(x, y):
    for i in range(0, x+1):
        for j in range(0, x+1):
            if 2*i + 4*j == y:
                return "Yes"
    return "No"

print(check(x, y))

Submission status: Wrong Answer

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

def check(x, y):
    for i in range(x):
        if 2*i + 4*(x-i) == y:
            return "Yes"
        elif y == 2 or y == 4:
            return "Yes"
    return "No"

print(check(x, y))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=[int(x) for x in input().split(" ")]
x=(b-2*a)/2
y=(4*a-b)/2
print("Yes" if x>0 and y>0 and x%1==0.0 and y%1==0.0 else "No")

Submission status: Wrong Answer

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

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

if(2*c+4*b==Y and (Y-a)%2==0 and c>=0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

if(2*c+4*b==Y and b>=0 and c>=0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
A_B = list(map(int, input().split()))
X = A_B[1] / 2 - A_B[0]
if X < 0:
    print("No")
elif (X - int(X)) < 0:
    print("No")
elif X > A_B[0]:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
A_B = list(map(int, input().split()))
X = A_B[1] / 2 - A_B[0]
if X <= 0:
    print("No")
elif (X - int(X)) < 0:
    print("No")
elif X > A_B[0]:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x, y = [int(i) for i in input().strip().split()]
print("Yes" if (y - 2 * x) >= 0 and (4 * x - y) >=0 else "No")

Submission status: Wrong Answer

Solution code:
x, y = [int(i) for i in input().strip().split()]
print((y - 2 * x) >= 0 and (4 * x - y) >=0)

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
A = y//2
B = (x-A)
while A>0:
    if y==2*A + 4*B:
        print("Yes")
        break
    A = A-1
    B = B+1
    if A==0:
        print("No")

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
A = y/2
while A>0:
    if y == 4*x - 2*A:
        print("Yes")
        break
    A = A-1
    if A==0:
        print("No")

Submission status: Wrong Answer

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

if (2*X - Y//2) >= 0 and (-X + Y//2) >= 0 and isinstance(2*X - Y//2, int) and isinstance(-X + Y//2, int):
  if (2*X - Y//2) == 0 and (-X + Y//2) == 0:
    print("No")
  else:
  	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 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) % 2 == 0 and 4*X >= Y:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

    


if __name__ == "__main__":
    b()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

# kame = x - turu
# 2*turu + 4*kame = y
# 2*turu + 4*(x - turu) = y
#  -2*turu + 4x - y = 0
# turu = 2x - 1/2*y

turu = 2*x - 1/2*y
print(turu)
if(turu.is_integer() and turu >= 0 and (x-turu) >= 0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

# kame = x - turu
# 2*turu + 4*kame = y
# 2*turu + 4*(x - turu) = y
#  -2*turu + 4x - y = 0
# turu = 2x - 1/2*y

turu = 2*x - 1/2*y
if(turu.is_integer and turu >= 0 and (x-turu) >= 0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

# kame = x - turu
# 2*turu + 4*kame = y
# 2*turu + 4*(x - turu) = y
#  -2*turu + 4x - y = 0
# turu = 2x - 1/2*y

turu = 2*x - 1/2*y
if(turu.is_integer and turu >= 0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
tmp = input().split(" ")
total = int(tmp[0])
leg = int(tmp[1])

if leg % 2 == 0 and 4 * total > leg > 2 * total:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
import sys

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

for n in range(x+1):
    kame = x - n

    tsuru_leg = n*2
    kame_leg = kame*4

    if y == tsuru_leg + kame_leg:
        print('yes')
        sys.exit()

print('no')

Submission status: Wrong Answer

Solution code:
import sys

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

tsuru = 0

for n in range(x+1):
    kame = x - tsuru

    tsuru_leg = tsuru*2
    kame_leg = kame*4

    if y == tsuru_leg + kame_leg:
        print('yes')
        sys.exit()
    tsuru = tsuru + 1

print('no')

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c=0
for i in range (1,a+1):
  for j in range (1,a+1-i):
    if (i+j)==a and (i*2 + j *4) == b:
      c+=1
if c== 0:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c=0
for i in range (a):
  for j in range (a - i):
    if (i+j)==a and (i*2 + j *4) ++ b:
      c+=1
if c== 0:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
c=0
for i in range (a):
  for j in range (a - i):
    if (i+j)==a and (i*2 + j *4) ++ b:
      c+=1
print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def solve(x, y):
    # |x| = |p + q  | = | 1 1 | |p|
    # |y|   |2p + 4q|   | 2 4 | |q|
    # <=>
    # |p| = 1/2 | 4 -1| |x|  =  (4x - y)/2
    # |q|       |-2  1| |y|     (-2x +y)/2
    p2 = 4 * x - y
    q2 = -2 * x + y
    if p2 % 2 == 0 and q2 % 2 == 0 and p2 > 0 and q2 > 0:
        return "Yes"
    return "No"


def main(istr, ostr):
    x, y = list(map(int, istr.readline().strip().split()))
    result = solve(x, y)
    print(result, file=ostr)


if __name__ == "__main__":
    import sys

    main(sys.stdin, sys.stdout)

Submission status: Wrong Answer

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

if(b%2==0):
    if(2*a<=b<=4*b):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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
y = y//2
if x <= y <= 2*x:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
n_all,leg_all=map(int, input().split())

for i in range(n_all):
    leg_kame=2*(n_all-i)
    leg_turu=4*i
    if leg_kame+leg_turu==leg_all:
        print('Yes')
        break
    else:
        continue
else:(print('No'))

Submission status: Wrong Answer

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