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.

Solution (Python):

k = 0
t = 0

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


if y % 2 == 1:
    print("No")
else:
    y2 = y / 2
    k = abs(x - y2)
    

    n = abs(4 * k - k)
    m = abs(x - y)
    t = abs(n - m)
    
    
    
    if k + t == x:
        print("Yes")
    else:
        print("No")

Solution (Python):
N, M = map(int,input().split())

kameasi = 4 * N

if M == kameasi:
  print('Yes')
  exit()

for i in range(1,N+1):
    
    f = kameasi - 2*i 
    if f == M:
        print('Yes')
        break
else:
    print('No')

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

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

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

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

is_plus = (a >= 0) and (b >= 0)
is_int = a.is_integer() and b.is_integer()

print(["No", "Yes"][is_plus and is_int])

Solution (Python):
def main():
    X,Y = map(int,input().split())
    if Y%2 != 0:
        print('No')
        return
    if (4*X < Y) or  (2*X > Y):
        print('No')
        return
    print('Yes')

main()

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

Solution (Python):
X,Y = input().split()

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

Solution (Python):
N,M=map(int,input().split())

for i in range(N+1):
    j=N-i
    if 2*i + 4*j == M:
        print("Yes")
        exit()

print("No")

Solution (Python):
X, Y = [int(x) for x in input().split()]

ans = 'No'

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

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

Solution (Python):
import bisect, collections, copy, heapq, itertools, math, numpy, string
import sys
from bisect import bisect_left, bisect_right, insort
from collections import deque
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int, sys.stdin.readline().rstrip().split())
def MS(): return map(str, sys.stdin.readline().rstrip().split())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())



import bisect


x,y = MI()
if y % 2 ==0 and 2 * x <= y <= 4*x:
    print('Yes')
else:
    print('No')

Solution (Python):
X, Y = map(int, input().split())
flag = 0
for i in range(X+1):
    for j in range(X+1):
        if 2*i + 4*j == Y and i+j == X:
            flag = 1

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

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

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

stop = False
ans = 'No'

while not stop:
  for i in range(x+1):
    if y == (x -i) *4 + i * 2:
      ans = 'Yes'
      stop = True
    if i == x:
      stop = True

print(ans)

Solution (Python):
X,Y=map(int,input().split())
if X*4<Y or X*2>Y:
  print("No")
else:
  if (X-((4*X-Y)//2))*4+(4*X-Y)==Y:
    print("Yes")
  else:
    print("No")

Solution (Python):
n, k = map(int, input().split())
mi=n*2
ma=n*4
if k>=mi and k<=ma and k%2==0:
    print("Yes")
else:
    print("No")

Solution (Python):
animal,leg = [int(x) for x in input().split()]
import numpy as np
X = np.array([
    [1,1],
    [2,4]
])
Y = np.array([
    [animal],
    [leg]
])
X_inverse = np.linalg.inv(X)
answer = X_inverse.dot(Y)
result = 0
for x in answer:
    for y in x:
        if y<0 or not y.is_integer():
            result = True
            break
if result:
    print("No")
else:
    print("Yes")

Solution (Python):
num, legs = map(int, input().split())
BIRD = 2
TURTLE = 4

if legs % 2:
  print("No")
  exit(0)

bird_lst = [BIRD * n for n in range(num+1)]
turtle_lst = [TURTLE * n for n in range(num+1)]
turtle_lst.sort(reverse=True)

legs_lst = [b + t for b, t in zip(bird_lst, turtle_lst)]

if legs in legs_lst:
  print("Yes")
else:
  print("No")

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

Solution (Python):
from numba import jit


@jit
def solve(X, Y, Z):
    while X >= 0:
        if 2 * X + 4 * Z == Y:
            return True
        elif 2 * X + 4 * Z < Y:
            X -= 1
            Z += 1
        else:
            return False
    return False


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

    if solve(X, Y, Z):
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Solution (Python):


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

correct = False

i = 1
j = 1

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

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

if y%2==1:
  print("No")
  sys.exit()
if y//2-x < 0:
  print("No")
  sys.exit()
if 0 <= 2*x-y//2 <= x and 0<= y//2-x <= x:
  print("Yes")
else:
  print("No")

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

Solution (Python):
import sys

CR=0
TU=0
X,Y=map(int, input().split())
for i in range(0,X+1):
    CR=i
    TU=X-i
    if 2*CR+4*TU==Y:
        print("Yes")
        sys.exit()
    else:
        continue
print("No")

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

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

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

if m % 2 == 0 or m % 4 == 0:
  if (n * 4) >= m:
    if (n*2) <= m:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
else:
  print("No")

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

k = n*4

r = k-m

if(r == 0):
    print("Yes")
elif(r>0):
    if(r % 2 == 0 and r/2 <= n):
        print("Yes")
    else:
        print("No")
else:
    
    print("No")

Solution (Python):
import sys

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

for t in range(X + 1):
    for c in range(X + 1):
        if X < t + c:
            break

        if Y == ((t * 4) + (c * 2)) and X == (t + c):
            print("Yes")
            sys.exit()
            
print("No")

Solution (Python):
x, y = map(int, input().split())
b = 0
if y % 2 != 0:
  print("No")
  quit()
else:
  while x >= 0:
    c = x * 2 + b * 4
    if c == y:
      print("Yes")
      quit()
    x -=1
    b +=1
print("No")

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

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

if __name__ == '__main__':
    main()

Solution (Python):
x, y = map(int, input().split())
d = 'No'

for k in range(100 + 1):
  for t in range(100 + 1):
    if y == 4 * k + 2 * t and x == k + t:
      d = 'Yes'
print(d)

Solution (Python):
import math
from collections import defaultdict
def r():
    return int(input())
def rm():
    return map(int,input().split())
def rl():
    return list(map(int,input().split()))

a,b=rm()
res=False
for i in range(a+1):
    t=a-i
    if b==i*2+t*4:
        res=True
        break
if res:
    print('Yes')
else:
    print('No')

Solution (Python):
def main():
	x,y=map(int,input().split())
	ans=x*4
	if(ans==y):
		print("Yes")
		return
	for i in range(x):
		ans-=2
		if(ans==y):
			print("Yes")
			return

	print("No")


main()

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

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

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

Solution (Python):
anim, leg = [int(x) for x in input().split()]


y = (leg - 2*anim)  
x = (4*anim - leg)  

if y % 2 == 1 or x % 2 == 1 or y < 0 or x < 0:
    print("No")
else:
    print("Yes")

Solution (Python):

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

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

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

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

max_y = 4 * X
min_y = 2 * X

if max_y >= Y >= min_y:
    print("Yes")
else:
    print("No")

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

Solution (Python):
a,l = list(map(int, input().split()))
x = (4*a - l)/2
y = (l - 2*a)/2
if a==l==0:print('Yes')
else:
    if a>=l or l%2!=0:
        print('No')
    elif x+y == a and 2*x + 4*y == l:
        print('Yes' if y>=0 and x >= 0 else 'No')

Solution (Python):
x,y=map(int,input().split())
cnt=0
for i in range(x+1):
    if i*2 + (x-i)*4==y:
        cnt+=1

if cnt>=1:
    print("Yes")
else:
    print("No")

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

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

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

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

Solution (Python):
import numpy as np
X, Y=map(int,input().split())

crit=(4*X-Y)/2

ans="No"
if 4*X >= Y and Y%2==0 and Y >= 2*X:
  ans="Yes"

print(ans)

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

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

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

Solution (Python):
from itertools import combinations
x,y=map(int,input().split())
if y%2!=0:
	print("No")
else:
	if 2*x==y or 4*x==y:
		print("Yes")
	else:
		v=0
		for i in range(1,x+1):
			if 2*i+4*(x-i)==y or 4*i+2*(x-i)==y:
				print("Yes")
				v=1
				break
		if v==0:
			print("No")

Solution (Python):
from sys import stdin
X, Y = [int(x) for x in stdin.readline().rstrip().split()]
if Y % 2 == 0:
    Z = Y / X
    if 2 <= Z <= 4:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):
import numpy as np

Xin, Yin = input().split()

X = int(Xin)
Y = int(Yin)

a = np.array([[1, 1], [2, 4]])
b = np.array([X, Y])

result = np.linalg.solve(a, b)

if result[0].is_integer() and result[0] >= 0:
    if result[1].is_integer() and result[1] >= 0:
      print('Yes')
    else:
      print('No')
else:
  print('No')

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

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

c = a*2
d = a*4
if d < b:
  print('No')
elif c == b:
    print('Yes')
elif c <= b:
     if (b-c)%2 ==0:
        print('Yes')
     else:
        print('No')
else:
     print('No')

Solution (Python):
from math import ceil , floor
x,y=map(int,input().split())
if y<x or y&1:
	print('No')
elif x>=ceil(y/4) and x<=y//2:
	print('Yes')
else:
	print('No')

Solution (Python):
import sys

x,y = map(int,input().split())
if y % 2 != 0:
    print('No')
    sys.exit()

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

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

Solution (Python):
X,Y=map(int, input().split())
if(Y%2==1):
  print("No")
  exit()
if(2*X-Y//2<0):
  print("No")
  exit()
if(Y//2-X<0):
  print("No")
  exit()
print("Yes")

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

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

Solution (Python):
x, y = map(int, input().split())
a, b = 4*x - y, y - 2*x
if a % 2 != 0 or b % 2 != 0 or a < 0 or b < 0:
    print("No")
else:
    print("Yes")

Solution (Python):


import sys
iim = lambda: map(int, sys.stdin.readline().rstrip().split())

def resolve():
    it = map(int, sys.stdin.read().split())
    X, Y = next(it), next(it)

    for a in range(101):
        b = X - a
        if b < 0:
            continue
        if 2*a + 4*b == Y:
            print("Yes")
            return
    print("No")

if __name__ == "__main__":
    resolve()

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

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

Solution (Python):
animalNum,footNum = map(int,input().split())
kameFoot = 2
turuFoot = 4
totalFoot = 0
ansList = ["Yes","No"]
isYes = False
for i in range(animalNum + 1):
    totalFoot = (kameFoot * i + (turuFoot * (animalNum - i)))
    if(totalFoot == footNum):
        isYes = True
        
if(isYes):
    print(ansList[0])
else:
    print(ansList[1])

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

for i in range(x):
    val1 = 2 * i + 4 * (x - i)
    val2 = 4 * i + 2 * (x - i)
    if val1 == y:
        ans = "Yes"
        break
    if val2 == y:
        ans = "Yes"
        break
print(ans)

Solution (Python):

from functools import *
import sys
sys.setrecursionlimit(100000)
import numpy as np

def acinput():
    return list(map(int, input().split(" ")))


X,Y=acinput()


for x in range(0,101):
    for y in range(0,101):
        if x+y==X and 2*x+4*y==Y:            
            print("Yes")
            sys.exit()
            
print("No")

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

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

Solution (Python):
def main():

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


    a = x
    while a >= 0:
        if 2*a+4*(x-a) == y and x-a >= 0:
            return print('Yes')
        a -= 1

    return print('No')


if __name__=='__main__':
    main()

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

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


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

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

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

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

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

Solution (Python):
n_animal, n_foot = map(int, input().split())

checker = False
for i in range(n_animal + 1):
    n_kame = i
    n_tsuru = n_animal - n_kame
    n_foot_pred = n_kame * 4 + n_tsuru * 2
    
    if n_foot == n_foot_pred:
        checker = True
        break
    else:
        continue
if checker:
    print("Yes")
else:
    print("No")

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



p = 0

for p in range(x+1):
  if 2*p + 4*(x-p) - y == 0:
    p=x+5
    break
  else:
    x=x


if p==x+5:
  print("Yes")
else:
  print("No")

Solution (Python):
import numpy
X,Y=map(int,input().split())

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

else:
    N_max = int(Y/2)
    for n in numpy.array(range(N_max, -1, -2)):
        if X == n + (N_max - n)/2:
            print("Yes")
            break
    else:
        print("No")

Solution (Python):

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

if X == 1:
    if (Y == 2) or (Y == 4):
        flag = True
        
for i in range(X+1):
    for j in range(X+1):
        if (i + j) == X:
            if 2*i+4*j == Y:
                flag = True
                break


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

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

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

Solution (Python):
x, y = map(int, input().split())
 
kame = 0
turu = x
flag = 0
for i in range(x+1):
  kame = i
  turu = x - i
  if(kame*4 + turu*2 == y):
  	flag = 1

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

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

def main():
    ans_1 = x * 4 
    ans_2 = ans_1 - y 

    if ans_2 == 0:
        print("Yes")
        return

    elif ans_2 > 0 and ans_2%2 == 0:
        for i in range(0, x):
            ans_2 = ans_2 - 2

            if ans_2 == 0:
                print("Yes")
                return
        print("No")
        return
    else:
        print("No")
        return
main()

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

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

print("Yes" if count == y else "No")

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

Solution (Python):
x,y=map(int,input().split())
count=0
if y == 2*x or y == 4*x:
    count=1
else:
  for i in range(x):
    for j in range(x):
      if (i+j)==x:
        if (2*i) + (4 * j) == y:
          count+=1     
if count<1:
  print("No")
else:
  print("Yes")

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




c = 0
t = 0

for t in range(x+1):
  c = x - t
  if 4*x - 2*c == 2*c + 4*t == y:
    print("Yes")
    break
  elif t < x:
    continue
  else:
    print("No")

Solution (Python):
import sys
x, y = input().split(" ")
for i in range(int(x)+1):
  exp_i = int(x) - i



  if int(i) * 2 + exp_i * 4 == int(y):
    print("Yes")
    sys.exit()

print("No")

Solution (Python):
XY = input().split()
X = int(XY[0])
Y = int(XY[1])
c = (4*X-Y)/2
t = (Y-2*X)/2
if c >= 0 and int(c) == c:
    if t >= 0 and int(t) == t:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):
n, sum=list(map(int,input().split(' ')))
lower = n*2
upper = n*4

if (sum % 2 == 0) and (sum >= lower) and (sum <= upper):
  print ("Yes")
else:
  print("No")

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

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

Solution (Python):
[S,Y] = [int(i) for i in input().split()]

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

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



turu = 0
kame = 0
flag = 0
for t in range(0, x + 1):
    if t * 2 + (x - t) * 4 == y:
        turu = t
        kame = x - t
        flag = 1

    else:
        pass

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

Solution (Python):
number = input()
list = number.split()


def hoge(a, b):
    if a * 4 < b:
        print("No")
        return
    else:
        for i in range(a):
            n = i + 1
            n2 = a - n
            if n * 2 + n2 * 4 == b:
                print("Yes")
                return
        else:
            if a * 4 == b:
                print("Yes")
                return
            print("No")


hoge(int(list[0]), int(list[1]))

Solution (Python):
a = list(map(int,input().split()))
x = a[0]
y = a[1]
if y%2 == 1:
  print('No')
else:
  if (4*x >= y) & (y >= 2*x):
    print('Yes')
  else:
    print('No')

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

Solution (Python):
X, Y = list(map(int, input().split()))
X2 = X*2
for i in range(0,X+1):
  if X2+i*2 == Y:
    print('Yes')
    exit()
print('No')

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

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

Solution (Python):
n, m = map(int, input().split())
a =0
for i in range(n+1):
    for s in range(0, n+1-i)[::-1]:
        if 4*(i) + 2*(n-i) == m:
            a = a + 1
        else:
            a = a
if a > 0:
    print('Yes')
else:
    print("No")

Solution (Python):
s = input().split()
intX = int(s[0])
intY = int(s[1])

if (intX > intY / 2) :
    print('No')
    exit()

if ((intY / intX) > 4) :
    print('No')
    exit()

q, mod = divmod(intY, 2)
if (mod == 1) : 
    print('No')
    exit()

intB = (intY-2*intX) / 4
q2, mod2 = divmod(intB, 1)
if (mod == 0) : 
    print('Yes')
    exit()
print('No')

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

Solution (Python):
x, y = map(int, input().split())
num = [i for i in range(1, x)]
comb = []
for k in num:
    comb.append([k, x - k])
if y % 4 == 0 and y // 4 == x:
    print("Yes")
    exit()
elif y % 2 == 0 and y // 2 == x:
    print("Yes")
    exit()
for j in comb:
    if j[0] * 4 + j[1] * 2 == y:
        print("Yes")
        exit()
print("No")

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

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

Solution (Python):
total_count, total_legs = map(int, input().split())
isYes = 'false'

for i in range(total_count+1):
  test = 2*i+4*(total_count-i)
  if total_legs == test:
    isYes = 'true'
    print("Yes")

if isYes=='false':
  print("No")

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

a = int(4 * x - y)

if a % 2 == 0:
    t = a // 2
    if 0 <= t <= x:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Solution (Python):
XY_list = list(map(int, input().split()))
X = XY_list[0]
Y = XY_list[1]
k = Y/2 - X
t = 2*X - Y/2
if k%1 == 0 and t%1 == 0 and t >= 0 and k >= 0:
    print('Yes')
else:
    print('No')

Solution (Python):
x, y = map(int, input().split())
z = 0
res = 'No'
if y % 2 == 0:
    while x >= 0:
        i = x*2 + z*4
        if i == y:
            res = 'Yes'
        x -= 1
        z += 1
print(res)

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

crain = (4*x-y)/2
tar = -1*(2*x-y)/2




if (crain.is_integer() and crain > 0 and crain <= x) or (tar.is_integer() and tar > 0 and tar <= x):

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

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

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

Solution (Python):
X, Y = map(int, input().split())
fin = ""
if (X * 4 < Y or X * 2 > Y or Y % 2 != 0):
	fin += "No"
else:
	fin += "Yes"
print(fin)

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

Solution (Python):
x, y = map(int,input().split())
t , k = 2 , 4
ans = 0
for i in range(x+1):
    if y == (t*i + k*(x-i)):
        ans += 1

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

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

tmp = y - 2 * x

if tmp % 2 != 0:
    ans = "No"
else:
    b = tmp // 2
    a = x - b

    ans = "Yes" if (a >= 0 and b >= 0) else "No"

print(ans)

Solution (Python):
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')
a = X
b = 0
for i in range(X+1):
  if Y == a*2 + b*4:
    print('Yes')
    break
  else:
    a -= 1
    b += 1

Solution (Python):
xy = list(map(int, input().split()))
 
if 4*xy[0]-xy[1]<0 or -2*xy[0]+xy[1]<0:
    print('No')
elif 4*xy[0]-xy[1]==0 and -2*xy[0]+xy[1]==0:
    print('No')
elif (1/2*(4*xy[0]-xy[1]))%1!=0 or (1/2*(-2*xy[0]+xy[1])%1)!=0:
    print('No')
else:
    print('Yes')

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

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

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

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

for i in range(num + 1):
    tori = i
    kame = (num - i)
    if (tori * 2 + kame * 4) == total:
        print('Yes')
        break
else:
    print('No')

Solution (Python):
h,l=map(int,input().split())
temp=l//2
temp2=abs(temp-h)
temp1=abs(h-temp2)
if ((temp2*4)+(temp1*2))==l:
  print('Yes')
else:
  print('No')

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

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

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

Solution (Python):
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 and c+t == X:
            ans = "Yes"
            
print(ans)

Solution (Python):
def check2(X,Y):
    for s in range(0,X+1):
        if(4*X-Y==2*s):
            return True
    return False        


if __name__=="__main__":
    a,b = input().split()
    a = int(a)
    b = int(b)
    if(check2(a,b)):
        print("Yes")
    else:
        print("No")

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

res = 'No'

if y%2 == 1: 
    print(res)
elif x*4 == y or x*2 == y:
    print('Yes')

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

    print(res)

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

for two in range(X + 1):
    four = X - two

    if two * 2 + four * 4 == Y:
        print('Yes')
        exit()

print('No')

Solution (Python):

import sys
import numpy as np

YES = "Yes"  
NO = "No"  


def solve(X: int, Y: int):
    for i in range(1,X+1):
        j = X-i
        if (2*i+4*j)==Y or (4*i+2*j)==Y:
            print(YES)
            return
    print(NO)

    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  
    Y = int(next(tokens))  
    solve(X, Y)

if __name__ == '__main__':
    main()

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

Solution (Python):
x, y = map(int, input().split())
f = False
for i in range(x+1):
    for j in range(x+1):
        if (y == (i*2 + j*4)):
            if (x == i + j):
                f = True
                break
    if f:
        break
if f:
    print("Yes")
else:
    print("No")

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

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

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

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

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

wk1 = y - 2 * x
wk2 = 4 * x - y
res = 'Yes'
if wk1 < 0 :
   res = 'No'

if wk2 < 0 :
   res = 'No'

if wk1 % 2 > 0:
   res = 'No'

if wk2 % 2 > 0:
   res = 'No'

print(res)

Solution (Python):
import numpy as np


def main(X, Y):
    if 2*X <= Y and 4*X >= Y and Y % 2 == 0:
        return "Yes"
    return "No"


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

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

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

if y % 2 != 0:
    print('No')
    exit()
tsuru = ((x * 4) - y) // 2
if tsuru < 0:
    print('No')
else:
    if tsuru <= x:
        print('Yes')
    else:
        print('No')

Solution (Python):
xy = [int(x) for x in input().split()]
X = xy[0]
Y = xy[1]
if Y%2 == 0 and 2*X<= Y<=4*X:
    print('Yes')
else:
    print('No')

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


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

Solution (Python):
X, Y = [int(n) for n in input().split()]
ans = 'No'
for i in range(X+1):
    for j in range(X+1):
        if i+j == X and 2*i+4*j == Y:
            ans = 'Yes'
            break
print(ans)

Solution (Python):

MOD=10**9+7
INT_MAX=10**20+7
def INPUT():return list(int(i) for i in input().split())
def LIST_1D_ARRAY(n):return [0 for _ in range(n)]
def LIST_2D_ARRAY(m,n):return [[0 for _ in range(n)]for _ in range(m)]

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

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

for i in range(X+1):
    T = i
    K = X - T
    if Y == (2 * T + 4 * K):
        print('Yes')
        sys.exit()
else:
    print('No')