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

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

Submission status: Wrong Answer

Solution code:
s=input().rstrip().split(' ')
x=int(s[0])
y=int(s[1])
ans=2*x-y/2
if(ans>=0 and ans<=x):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

if X*2>Y or Y>X*4:
  print('No')
elif not Y%2==0:
  print('No')
elif 50 < X:
  print('No')
elif Y%6==0:
  if Y == X*6:
    print('Yes')
  else:
    print('No')
elif Y%3==0:
  if Y == X*3:
    print('Yes')
  else:
    print('No')
elif Y%2==0:
  if Y == X*2:
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
  X, Y = map(int, input().split()) # スペース区切り入力
  if Y % 2 == 1:
    print('No')
  else:
    if Y <= X * 4:
      print('Yes')
    else:
      print('No')
    
if __name__ == '__main__':
  main()

Submission status: Wrong Answer

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

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

print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if Y%X ==0 or Y%X ==2 or Y%X ==4:
  if Y/X <= 4:
    print("Yes")
    exit()
  else:
    print("No")
    exit()

print("No")

Submission status: Wrong Answer

Solution code:
import sys
def main():
    x, y = map(int, input().split())
    
    for i in range(0, 3):
        for j in range(0, 3-i):
            res = i * 2 + j * 4
            if y == res:
                print('Yes')
                sys.exit()
                
    print('No')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
c, z = map(int, input().split())

x = (4 * c - z) / 2
yojo = (4 * c - z) % 2

if(x >= 0 and yojo == 0):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

if (y % 6 == 2) or (y % 6 == 4) or (y % 2 == 0) or (y % 4 == 0):
    print("Yes")
else:
    print("no")

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())
#a,bをかめとつるの数とする、これはそんなに量多くないので行ける
for a in range(X+2):
    if a==X+1:
        print("No")
    elif int((Y-4*a)/2)==X-a:
        print("Yes")
        break
    else:
        continue

Submission status: Wrong Answer

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


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

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

a = x-b
2b = y  - 2x
"""
def f(x,y):
  	
	if (y - 2*x) < 0: return False
	b = (y - 2*x)/2
	a = x - b
	if a < 0: return False


	return a+b == x and 2*a - 4*b ==y
  
print 'Yes' if f(x,y) else 'No'

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
X, Y= map(int, input().split())
if (Y % 2) != 0:
  print('No')
else:
  if (2 * X - Y /2 ) > 0:
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
if X == 1:
    if 2 * 1 == Y:
        print('Yes')
        exit()
    if 4 * 1 == Y:
        print('Yes')
        exit()

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

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
for i in range(1, x+1):

    ashi = 2 * i + 4 * (x - i)
    if ashi == y:
        print("Yes")
        break
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys

(x, y) = map(int, sys.stdin.readline().strip().split())

if y % 2 == 1:
    print('No')

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

if a < 0 or b < 0:
    print('No')
else:
    print('Yes')

"""
a: 鶴の数、b: 亀の数
a + b = x -> 2a + 2b = 2x
2a + 4b = y

より
2b = -2x + y -> b = -x + 1/2y
"""

Submission status: Wrong Answer

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

a=b=0


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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

i = 0
flag = 0
while True:
    if((Y / 2) - i == X):
        flag = 1
        break
    else:
        if((Y / 2) - 2*i < 0):
            break
        i += 1
if(flag == 1):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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

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

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

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())
n=int(Y/2)
check=0
if 2 * X == Y:
    check = 1
elif 4 * X == Y:
    check = 1
else:
    for i in range(n):
        #print("i=",i,"n=",n)
        if (2*(i+1) % 4 == 0) & (2*(i+1) + 4*(X-i-1) == Y):
            check=1
            break
if check==1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
all, leg = map(int, input().split())

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

Submission status: Wrong Answer

Solution code:
import sys


def ip():
    return sys.stdin.readline()


def ipl():
    return sys.stdin.readline().split()


def solve():
    a, b = map(int, ipl())
    c = 2 * a - (b / 2)
    t = a - c
   # print(t >= 0, c >= 0, t + c, t + c == a)
    if t >= 0 and c >= 0 and t + c == a:
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

if Y / 2 == X:
    print("Yes")

if Y/2 < X:
    print("No")

if Y/2 > X:
    tsuru = (Y-2*X)/2

    if tsuru%1 == 0 and tsuru < X:
        print("Yes")
    
    else :
        print("No")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
import numpy as np

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(X: int, Y: int):
    a = (4*X-Y)//2
    if (4*X-Y)//2>0:
        print(YES)
    else:
        if (2*X-Y)//4>0:
            print(YES)
        else:
            print(NO)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    Y = int(next(tokens))  # type: int
    solve(X, Y)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a=input().split(" ")
ans=0
x=0
for i in range(1,int(a[0])):
	for j in range(1,int(a[0])):
		ans=(i*2)+(j*4)
		if ans==int(a[1]) and i+j==int(a[0]):
			x=x+1
if x>=1:
	print("Yes")
elif x==0:
	print("No")

Submission status: Wrong Answer

Solution code:
import numpy as np

x, y = map(int, input().split())
A = np.array([
        [1, 1],
        [2, 4]
    ])
b = np.array([x, y])
inv_A = np.linalg.inv(A)
solve = inv_A @ b
print("No" if solve[0] < 0 or solve[1] < 0 else "Yes")

Submission status: Wrong Answer

Solution code:
import numpy as np

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

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

total = cranes + turtles

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

Submission status: Wrong Answer

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

flag = 0

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

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

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

Submission status: Wrong Answer

Solution code:
a=[]
a=list(map(int,input().strip().split()))[:2]
if a[1]%2==0:
  if a[1]<=4*a[0]:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Wrong Answer

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

    turu = 2
    kame = 4

    k_num = int(Y / kame)

    while True:
        t_num = X - k_num

        asi = kame * k_num + turu * t_num

        if t_num >= 0:        
            if asi > Y:
                k_num -= 1
            elif asi == Y:
                return 'Yes'
            elif asi < Y:
                return 'No'
        else:
            return 'No'

print(Crane_and_Turtle())

Submission status: Wrong Answer

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

if (Y%2 == 1):
  print("No")
elif (Y > (X*4)):
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

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

while x>0:
    x=x-1
    if y>=4:
        y=y-4
    elif y>=2:
        y=y-2
        
    else:
        break

if y==0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N, M = map(int,input().split())
crain = (4 * N - M) / 2
t = N - crain
if crain.is_integer() and t.is_integer():
  print("Yes")

else:
  print("No")

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
import numpy as np

XY = np.asarray( list(map(int, input().split())) )

Ainv = np.asarray([[2, -0.5], [-1, 0.5]])

x, y = Ainv.dot(XY)

if x.is_integer() and y.is_integer():
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
from sys import stdin
x, y = map(int, stdin.readline().rstrip().split())

res = 'No'
if y%2 == 1: #偶数だけ
    print(res)
elif y/4 > x: #亀だけ
    print(res)
elif y/2 < x: #つるだけ
    print(res)
else:
    for i in range(0, x):
        if i*4 + (x-i)*2 == y:
            res = 'Yes'

    print(res)

Submission status: Wrong Answer

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

crain = (4 * X - Y) / 2

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if Y>4*X:
    print('No')
    exit()
else:
    pass

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
def do():
    n,m=map(int,input().split())
    if n==1 or m==1:
        return "No"

    if 2**n==m or (2**n)+2==m:
        return "Yes"
    else:
        return "No"
print(do())

Submission status: Wrong Answer

Solution code:
import sys

N, M = map(int, input().split())

for i in range(1, N+1):
    f = 2 * i + 4 * (N - i)
    if f == M:
        print('Yes')
        sys.exit()
print('No')

Submission status: Wrong Answer

Solution code:
list= input().split(" ")
X=int(list[0])
Y=int(list[1])

for w in range(X+1):
    print(w)
    z = X-w#crane_num
    w_leg_num = int(w)*2#turtle_leg_num
    z_leg_num = int(z)*4
    total_leg_num =w_leg_num+z_leg_num
    if total_leg_num == Y:
        print("Yes")
        break
    elif w==X:
        print("No")

Submission status: Wrong Answer

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

if Y%2 != 0:
    print("No")
else:
    flag = False
    for x in range(1, X+1):
        leg = x*2 + (X-x)*4
        if leg == Y:
            flag = True
            break
    if flag:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

for i in range(x):
    if i*2+(x-i)*4==y:
        z=1

if z==1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:

def resolve():
    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")
resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

num = target[0]
total = target[1]

flg = False
for i in range(target[0]+1):
    for j in range(target[0]+1-i):
        tori = i * 2
        kame = j * 4
        if (tori + kame) == total:
            flg = True
            break
    if flg:
        print('Yes')
        break
else:
    print('No')

Submission status: Wrong Answer

Solution code:
n = input().split()
x = int(n[0])
y = int(n[1])

if y/x > 4:
    print("No")

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

Submission status: Wrong Answer

Solution code:
import sys

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

for a in range(X):
    kame = a+1
    tsuru = X-kame
    if kame * 2 + tsuru * 4 == Y:
        print("Yes")
        sys.exit()

print("No")

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
turu = 4
kame = 2
flag = 'No'
for i in range(a+1):
  for j in range(a+1):
    if b == turu * i + kame * j:
      flag = 'Yes'

print(flag)

Submission status: Wrong Answer

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

crain = (4*x - y) / 2
if crain.is_integer() and crain > 0:
    crain = int(crain)
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
c = 2*x - y/2
t = y/2 - x
#print(c,t)
if (c >= 0 and t >= 1) or (c >= 1 and t >= 0):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
if y%2!=0:
    print("No")
elif (y%2)%4==0 and x*6>=y or x*2==y or x*4==y:
    print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
x,y = map(int,input().split())
if y % x != 0:
    print('No')
    sys.exit()
if 2**x >= y:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
li = input().split()
num = int(li[0])
foot = int(li[1])
a = 0
for i in range(num+1):
  for j in range(num+1-i):
    n = 2*i + 4*j
    if n == foot:
      a += 1
      if a == 1:
        print("Yes")

if a == 0:
  print("No")

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())
ans="NO"
if X<=50:
    for i in range(X+1):
        if i*2+(X-i)*4==Y:
            ans="Yes"
print(ans)

Submission status: Wrong Answer

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

ans = "Yes"
if y % 2 != 0:
  ans ="No"
elif (y - (x * 2) ) / 2 > x :
  ans = "No"

print(ans)

Submission status: Wrong Answer

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

judge = (y - 4 * x) / 2
if judge.is_integer():
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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

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

a = x-b
2b = y  - 2x
"""
def f(x,y):
  	
	if (y - 2*x) < 0: return False
	b = y - 2*x
	a = x - b
	if a < 0: return False


	return a+b == x and 2*a+ 4*b ==y
  
print 'Yes' if f(x,y) else 'No'

Submission status: Wrong Answer

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

count = 0

for i in range(x+1):
    for j in range(x+1):
        if 2*i + 4*j == y:
            count += 1

if count >= 1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
L = [int(i) for i in input().split()]
flag=0
for i in range(L[0]+1):
    # print(L[1]-i*2-(L[0]-i)*4)
    if L[1]-i*2-(L[0]-i)*4==0:
        print("Yes")
        flag=1
        break
    if L[1]<i*2+(L[0]-i)*4:
        # print("df")
        break

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

Submission status: Wrong Answer

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

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:
import itertools, sys
X, Y = map(int, input().split())

crane = [x for x in range(X+1)]
turtle = [x for x in range(X+1)]

ans = "No"
for c in crane:
    for t in turtle:
        if c*2 + t*4 == Y and c+t <= X:
            ans = "Yes"
            

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    X, Y = list(map(int, input().split()))
    a = Y / 4
    b = Y / 2
    if X >= a and X <= b:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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


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

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

a = x-b
2b = y  - 2x
"""
def f(x,y):
  	
	if (y - 2*x) < 0: return False
	b = y - 2*x
	a = x - b
	if a < 0: return False


	return a+b == x and 2*a - 4*b ==y
  
print 'Yes' if f(x,y) else 'No'

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys

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

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

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

print('No')

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
"""AtCoder Beginner Contest 170: B - Crane and Turtle
https://atcoder.jp/contests/abc170/tasks/abc170_b
"""


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

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
import math

l=list(map(int,input().split()))
if l[0]*2<=l[1]<=l[0]*4:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
data = input().split()

legs = int(data[1])
animals = int(data[0])
flag = 0

if int(data[1]) % 2 == 1:
  flag = 0
elif int(data[0]) * 4 < legs:
  flag = 0
else:
  ans = animals * 2
  for i in range(animals):
    if ans == legs:
      flag = 1
      break
    ans += 2

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

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

if a*2 <= b and  b <= a*4:
    print("Yes")
    exit()
print("No")

Submission status: Wrong Answer

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


for i in range(1, x+1):
    # 足の数
    f = 2 * i + 4 * (x - i)
    if f == y:
        print('Yes')
        break
else:
    print('No')

Submission status: Wrong Answer

Solution code:

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


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

crane = (4*x-y)/2
turtle = (y-2*x)/2

if crane < 0 or turtle < 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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


def is_odd(num):
    if num % 2 == 0:
        return False
    else:
        return True


if ans <= 0:
    print('No')
elif is_odd(4*x - y):
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

cnt = Y //2
ans = 0

#つるをi
for i in range(cnt):
  if 2*i ==  8 - 4*(X-i) and i !=0:
    ans +=1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x, y = (int(i) for i in input().split())
sum_foots = 4*x
while(sum_foots >= 2*x):
    sum_foots -= 2
    if sum_foots == y:
        print('Yes')
        exit()
print('No')

Submission status: Wrong Answer

Solution code:
#!/usr/local/bin/python3
# coding: utf-8

ha = input()
kita = ha.split(" ")
x = int(kita[0])
y = int(kita[1])
ifAshi = False

for i in range(x):
    if(x == 1):
        if(y == 2 or y == 4):
            ifAshi = True
    if((y - 2*i)%4 == 0):
        if((x-i) == ((y - 2*i)/4)):
            ifAshi = True

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

Submission status: Wrong Answer

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

tmp = (Y-2*X) / 2

if tmp < 0 or (X-tmp) < 0 :
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

x,y = list(map(int, input().split()))
tmp = y%2
count = 0
"""
while tmp == 0:
    y /= 2
    tmp = y%2
#    print(y)
    count += 1
print(count)
if y ==1 and count >= x:
    print("Yes")
else:
    print("No")
"""

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

print("No")

Submission status: Wrong Answer

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

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

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

for i in range(50):

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

Submission status: Wrong Answer

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

def check():
    for i in range(1,101):
        if i * 2 + (X - i) * 4 == Y:
            return 'Yes'
    return 'No'

print(check())

Submission status: Wrong Answer

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

ans_1 = x * 4 #12
ans_2 = ans_1 - y #4
# print(ans_2)
if ans_2 > 0 and ans_2 % 2 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

if ((x==1 and y==2) or (x==1 and y==4)):
    print('Yes')
    sys.exit()

b = (y - 2 * x) * 1.0 / 2
a = x - b
if b.is_integer() and 0 < b and 0 < a:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

max = X * 4

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
x, y = map(int, input().split())

if x == 1:
    if (y == 2) or (y == 4):
        print("Yes")
    else:
        print("No")
else:
    ans = (4 * x - y) / 2

    if ans <= x and ans >= 1:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
import sys
x,y = map(int,input().split())
if (y == 0):
  print('No')
  sys.exit()
for turu in range(x):
  if(( 4 * x - y ) / 2 == turu):
    print('Yes')
    sys.exit()
print('No')

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
if X == 1:
    if 2 * 1 == Y:
        print('Yes')
        exit()
    if 4 * 1 == Y:
        print('Yes')
        exit()

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

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
if X * 2 >= Y:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

flag = 0
for i in range(x):
  if (i * 2 + (x - i) * 4) == y:
    print("YES")
    flag = 1
    break
if flag == 0:
	print("NO")

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    X, Y = list(map(int, input().split()))
    a = Y / 4
    b = Y / 2
    if X >= a and X <= b:
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

f = False
for num_of_tsuru in range(1, x+1):
    num_of_kame = x - num_of_tsuru
    if (2*num_of_tsuru) + (4*num_of_kame) == y:
        f = True
        break

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

Submission status: Wrong Answer

Solution code:

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

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

if yn=="":        
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
input_line = input().split(" ")
X=int(input_line[0])
Y=int(input_line[1])
Z=4*X-Y
H=Z/2
if H<0:
  print("No")
elif 4*X-2*H==Y:
  print("Yes")
  
else:
  print("No")

Submission status: Wrong Answer

Solution code:
#デフォルト
import itertools
from collections import defaultdict
import collections
import math
import sys
sys.setrecursionlimit(200000)
mod = 1000000007

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
i=(input().split())
x=int(i[0])
y=int(i[1])

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

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