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

Submission status: Wrong Answer

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

y = abs(Y - 2 * X)
x = abs(4 * X - Y / 2)
if y%2 == 0 and x%2 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
from sys import stdin

x,y=[int(x) for x in stdin.readline().rstrip().split()]

exist=2*x

for i in range(x):
    if y == exist:
        print("Yes")
        quit()
    exist+=2
print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
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 + t > X:
            break
        if c*2 + t*4 == Y:
            ans = "Yes"
            

print(ans)

Submission status: Wrong Answer

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

if y%2!=0:
    print('No')
elif a<=x:
    print('Yes')    
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 not (ans.is_integer):
        print("No")        
    if ans <= x and ans >= 1:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

    print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

t=2
k=4

tx=2*x
kx=4*x

yk=y//k
ykyk=y-k*yk
ans='No'

if kx<y:
    pass
elif ykyk%2==0:
    ans='Yes'
print(ans)

Submission status: Wrong Answer

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

crain = (4 * X - Y) / 2

if crain.is_integer() and 0 < crain <= X:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

if Y%2!=0 :
    print('No')
    flg=True
else:
    for i in range(0,X+1):
        j=X-i
        if i*2+j*4 == Y or j*2+i*4 == Y:
            print(i,j)
            print("Yes")
            flg=True
            break

if flg==False:
    print('No')

Submission status: Wrong Answer

Solution code:
# B - Crane and Turtle

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

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

#print(a,b)

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

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
    kame = X - tsuru

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

Submission status: Wrong Answer

Solution code:
i = input()
n = i.split(' ')

x = int(n[0])
y = int(n[1])
even = y % 2 == 0

xt = x * 2
xf = x * 4

if y > (x * 4) or not even:
  print('No')
elif y == 2 or y == 4:
  print('Yes')
elif y >= xt and y <= xf:
  print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

# つる:a かめ:b

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

Submission status: Wrong Answer

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

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

if y%2 != 0 or (a <= 0 and b <= 0):
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

z = y // 2

for i in range(1, x):
    z = z + 2
    if y ==z:
        print("Yes")
        exit()

print("No")

Submission status: Wrong Answer

Solution code:
a,b = [int(i) for i in input().split()]
ans='No'
if b%2==0 and (b%a == 2 or b%a == 4 or b%a==0) and b<=4*a and b!=a: ans='Yes'
print(ans)

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 x == 1 and y == 4:
        print("Yes")
        break
    elif x == 2 and y == 8:
        print("Yes")
        break
    elif f == y:
        print("Yes")
        break
else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if  (y - x*2)%2 == 0:
    a = (y-x*2)//2
    b = x - a
    if b < 0:
        print("No")
        exit(0)
    if y == b * 2 + a * 4:
        print("Yes")
        exit(0)


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)/2
	a = x - b

	b = (y - 2*x)/2
	a = x - b
	
	if a < 0: return False
	return True

	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=[int(x) for x in input().split()]
if y%2==0 and y>=2*x: print("Yes")
else: print("No")

Submission status: Wrong Answer

Solution code:
a = input().split()
if int(a[1]) % 2 != 0:
    print('No')
elif int(a[0]) * 4 == int(a[1]) or int(a[0]) * 2 == int(a[1]) or 2 * int(a[0]) - int(a[1]) / 2 >= 1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import math


X,Y=map(int, input().split())
if math.isclose(-Y//2+2*X, round(-Y//2+2*X)) and math.isclose(Y//2-X, round(Y//2-X)) and Y//2-X>0 and -Y//2+2*X>0:
    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) - 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())
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:
n , total = map(int,input().split())

if total % 2 == 0 :
    if 2*n <= total and 4*n >= total:
        print("yes")
    else:
        print("No")
else:
    print("No")

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
    x=x-1

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

Submission status: Wrong Answer

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

a = (X*4) - Y

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

Submission status: Wrong Answer

Solution code:
A = [int(x) for x in input().split()]

x = A[0]
y = A[1]
check=0
 
for i in range(x):
  z = i*2+(x-i)*4
  if z==y:
    print("Yes")
    check+=1
if check==0:
  print("No")

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())
isOK = False
kame = 0
turu = int(Y/2)
if turu == X:
  isOK = True
for i in range(turu-X):
  if turu != X:
    kame = kame + 1
    turu = turu - 2
  if (turu+kame) == X:
    isOK = True
    break
if isOK == True:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

    if Y == 4:
        print("Yes")
        return

    while X > 0:
        if 2 * X < Y:
            Y -= 4
            X -= 1
        elif 2 * X == Y:
            print("Yes")
            return
    print("No")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

while True:
    if Y % 2 == 1:
        print('No')
        break
    elif 4*X >= Y:
        print('Yes')
        break
    else:
        print('No')
        break

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
    print('turu:',turu)
    print('kame:',kame)
    hon=2*turu+4*kame
    if hon == y:
        flag = True
        
for i in range(1,x+1):
    turu = x-i
    kame = i 
    print('turu:',turu)
    print('kame:',kame)
    hon=2*turu+4*kame
    if hon == y:
        flag = True
    
if flag == True:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x,y=(int(x) for x in input().split())
a = ((y-x*2)/2)
if a%1==0 and a>=0 and a<=x:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

ans = "No"
i = 0
while i <= x:
  if x == i:
    if i * 2 == y:
      ans = "Yes"
    break
  z = y - 2 * i
  if z == 0:
    ans = "Yes"
    break
  if z % ((x - i) * 4) == 0:
    ans = "Yes"
    break
  i += 1

print(ans)

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
    a = X - b
    # print('a:{}, b:{}'.format(a, b))

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
x,y=(map(int,input().split()))
s=(4*x-y)/2.0
if s > 0 and (s*10%10==0):
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

x, y= na()

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

Submission status: Wrong Answer

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

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

if  c>= 0 and  t>= 0:
	if c >= 1 or t >= 1:
		if c.is_integer() == 1 and t.is_integer() == 1:
			print('Yes')
else:
	print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
animal,leg = [int(x) for x in input().split()]
# crane + turtle = animal
# 2*crane + 4*turtle = leg
import numpy as np
A = np.array([
    [1,1],
    [2,4]
])
B = np.array([
    [animal],
    [leg]
])
A_inv = np.linalg.inv(A)
ans = A_inv.dot(B)
result = 0
for a in ans:
    for b in a:
        if b<0:
            result = 1
            break
if result:
    print("No")
else:
    print("Yes")
# print(ans)

Submission status: Wrong Answer

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

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())#整数値　複数の入力
def S_MAP(): return map(str, input().split())#文字　複数の入力
def LIST(): return list(map(int, input().split()))#整数　複数の入力　配列
def S_LIST(): return list(map(str, input().split()))#文字　複数の入力　配列


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

Submission status: Wrong Answer

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

x=(4*n-m)/2
y=n-x

if (x and y)>0:
  if (x+y)==m:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def CraneAndTurtle():

    CraneAndTurtle = list(map(int,input().split()))

    flag_num_1 = float(float(CraneAndTurtle[1] - 2.*CraneAndTurtle[0])/2.) - int(float(CraneAndTurtle[1] - 2.*CraneAndTurtle[0])/2.)

    flag_num_2 = float(float(4.*CraneAndTurtle[0] - CraneAndTurtle[1])/2.) - int(float(4.*CraneAndTurtle[0] - CraneAndTurtle[1])/2.)


    if flag_num_1 == 0 or flag_num_2 == 0:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    CraneAndTurtle()

Submission status: Wrong Answer

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

if 4 * x < y:
    print("No")
else:
    if y % 2 == 0:
        print("Yes")
    else:
        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())

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

Submission status: Wrong Answer

Solution code:
import numpy as np
X,Y=map(int, input().split())
A = np.matrix([
[1, 1],
[2, 4]
])
Y = np.matrix([
[X],
[Y]
])

ANS=0
try:
    np.linalg.inv(A)*Y
    if min(np.linalg.inv(A)*Y)>=0:
        ANS="Yes"
    else:
        ANS="No"
except:
    ANS="No"

print(ANS)

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 ) >= 1:
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

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

if  (y - x*2)%2 == 0:
    a = (y-x*2)//2
    b = x - a
    if b < 0:
        print("NO")
        exit(0)
    if y == b * 2 + a * 4:
        print("YES")
        exit(0)


print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
def main():
    x, y = map(int, input().split())
    
    for i in range(0, x):
        for j in range(0, x-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:
def main():

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

        if X*4<Y:
                ans = "No"
        elif X*2>Y:
                ans = "No"
        else:
                for i in range(X+1):
                        temp = i*2 + (X-i)*4
                        if temp==Y:
                                ans = "Yes"
                                break

        return ans

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
A = (4*X-Y)
if  A%2 == 0 and A/2 >= 0:
  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")
    exit()

print("No")

Submission status: Wrong Answer

Solution code:
import sys

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

for i in range(X):
    for j in range(X,1,-1):
        if Y == 4*i + 2*j:
            print("YES")
            sys.exit()

if X == 1:
    if Y == 4 or Y == 2:
        print("YES")
        sys.exit()

print("NO")

Submission status: Wrong Answer

Solution code:
#----

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

A = -(-4*x+y)
B = (-2*x+y)

if (A < 0 or B < 0):
  print("No")
  exit()

if ((A + B == 2*x) and (A+2*B == y)):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


for i in range(x+1):
    zzz = y - i * 4
    if x - i != 0:
        if zzz // (x - i) == 2:
            print('Yes')
            quit()
    else:
        if zzz == 0:
            print('Yes')
            quit()

print('No')

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
if y>=2*x and y<=4*x:
  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())
K = Y / 2 - X#48
T = 2 * X - Y / 2 #

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import numpy as np

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

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

total = cranes + turtles

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

Submission status: Wrong Answer

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

for tsuru in range(a, 0):
    if 2*tsuru + 4*(a-tsuru) == b:
        print("Yes")
        exit()
print("No")

Submission status: Wrong Answer

Solution code:
totalNum, totalFoot = map(int, input().split())

if totalFoot <= totalNum * 4:
    flg = False
    for i in range(totalNum + 1):
        craneNum = i
        turtleNum = totalNum - i
        foot = (craneNum * 2) + (turtleNum * 4)

        if foot == totalFoot:
            flg = True
            print("YES")
            break
    
    if not flg:
        print("NO")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:
import numpy as np
ans = 'Yes'
x, y = map(int, input().split())
A = np.matrix([[1, 1], [2, 4]])
Y = np.matrix([[x], [y]])
calc = np.array(np.linalg.solve(A,Y))
for i in calc:
  if int(i[0]) < 0:
    ans = 'No'
    break
print(ans)

Submission status: Wrong Answer

Solution code:
import sys

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#B
X,Y = map(int,input().split())
word = "No"
for i in range(1,X+1):
    k = X-i
    if Y == k*4 + i*2:
        word = "Yes"
    else:
        pass
print(word)

Submission status: Wrong Answer

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

c = 2 * XY[0] - XY[1] / 2
t = - XY[0] + XY[1] / 2

if (not isinstance(c, int)) or (not isinstance(t, int)):
  print('NO')
elif c == 0 and t == 0:
  print('NO')
elif c >= 0 and t >= 0:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
crane = (4 * X - Y) / 2
if crane.is_integer() and crane > 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:
x,y = map(int,input().split())

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

Submission status: Wrong Answer

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

y = y // 4
if y % 2 == 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
def crane_and_turtle():
    condition = input()
    num_str = condition.split()
    X = int(num_str[0])
    Y = int(num_str[1])
    
    a = 0
    b = X
    
    for i in range(X+1):
        a += 1
        b -= 1
        if 2*a + 4*b == Y:
            print('Yes')
            return
    
    print('No')
    return

crane_and_turtle()

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

if (y%2 == 0 or y%4==0):
    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:
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:
a,b = [int(i) for i in input().split()]
ans='No'
if b%2==0 and (b%a == 2 or b%a == 4 or b%a==0) and b<=4*a: ans='Yes'
print(ans)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

X, Y = [int(s) for s in input().split()]

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

low = Y // 4 + (Y % 4 != 0)
high = Y // 2

print(low, high)

if low <= X <= high:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import math


X,Y=map(int, input().split())
if math.isclose(-Y//2+2*X, round(-Y//2+2*X)) and math.isclose(Y//2-X, round(Y//2-X)) and Y//2-X>0 and -Y//2+2*X:
    print("Yes")

else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
s = s.split(' ')

X = int(s[0])
Y = int(s[1])

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

Submission status: Wrong Answer

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

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

else:
    print('No')

Submission status: Wrong Answer

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

num_kame = (Y - 2*X)/2
num_tsuru = (4*X - Y)/2

if (num_kame >= 0) and (num_tsuru >= 0) and (num_kame.is_integer()) and (num_tsuru.is_integer()):
    print('Yes')
else:
    print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
x, y = map(float, input().split())
cranes = (4 * x - y) / 2

if cranes.is_integer() and cranes > 0:
    print('Yes')
elif cranes == 0 and y % 4 == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys

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

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

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())
t=0
if(y>4*x):
  print("NO")
elif(y==2*x or y==4*x):
  print("YES")
else:  
  for i in range(x+1):
    j=x-i
    if((2*i+4*j)==y):
      print("YES")
      break
    else:
      t=t+1
  if(t==x+1):
    print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
X,Y = map(int, input().split())
turu_result = 2 * X
remaining = Y - turu_result
kame = 4 - 2
kame_result = remaining // kame 
if (X - kame_result) > 0:
    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:
    print('No')
elif Y % 2 == 1:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

def check(x, y):
    # そもそも４本足の動物の数を超えていればありえない
    if x * 4 > y:
        print("No")
        return

    # 足の数が奇数もありえない
    if y % 2 != 0:
        print("No")
        return

    # 動物の可能性を考える
    for i in range(0, x):
        # 2本足,4本足の動物の数
        leg2_animal = i+1
        leg4_animal = x - leg2_animal
        
        # 全体の足の数を数えてみる
        sum_legs = leg2_animal * 2 + leg4_animal * 4

        if sum_legs == y:
            print("Yes")
            return

    print("No")

check(x,y)

Submission status: Wrong Answer

Solution code:
X,Y=input().split();
X=int(X);
Y=int(Y);
K=(Y-2*X)/2;
if not K-int(K)==0:
  print('No');
  exit()
T=X-K;
if K>0 and T>0:
  print('Yes');
else:
  print('No');

Submission status: Wrong Answer

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

t = (Y / 2) - X
c = 2 * X - (Y/2)

if c < 0 or t < 0:
    print('No')
else:
    if c+t == X:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys

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

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

Submission status: Wrong Answer

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

if  (y - x*2)%2 == 0:
    a = (y-x*2)//2
    b = x - a
    if b < 0:
        print("NO")
        exit(0)
    if y == b * 2 + a * 4:
        print("YES")

else:
    print("NO")

Submission status: Wrong Answer

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

x, y = map(int, readline().split())
for i in range(50):
    for j in range(25):
        if i * 2 + j * 4 == y:
            if i + j == x:
                print('Yes')
                exit()
print('No')

Submission status: Wrong Answer

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

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

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

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