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):
def readInt():
    return list(map(int,input().split()))
    
x,y = readInt()
crain = (4*x-y)/2
turtle = (y-2*x)/2
if crain.is_integer() and turtle.is_integer and crain >= 0 and turtle >= 0:
    print('Yes')
else:
    print('No')

Solution (Python):
x, y = map(int, input().split())
a = 0
for i in list(range(0, 51)):
    for m in list(range(0, 26)):
        if i * 2 + m * 4 == y and i + m == x:
            a += 1
if 50 < x:
    a = 0
if a == 1:
    print('Yes')
else:
    print('No')

Solution (Python):

from sys import stdin
input = stdin.readline

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

else:
    print("No")

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor, gcd
from operator import mul
from functools import reduce
from operator import mul
import pprint



sys.setrecursionlimit(2147483647)
INF = 100
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007


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

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

b=y-2*x


if b==0:
  print('Yes')
elif b<0:
  print('No')
elif b%2!=0:
  print('No')
  
elif x >=b/2:
  
  print('Yes')
else:
  print('No')

Solution (Python):
from sys import stdin, stdout
import sys
INF=1e9
def get_int(): return int(stdin.readline().strip())
def get_ints(): return map(int,stdin.readline().strip().split()) 
def get_array(): return list(map(int,stdin.readline().strip().split()))
def get_string(): return stdin.readline().strip()
def op(c): return stdout.write(c)


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

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

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

print("No")

Solution (Python):
import sys

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

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

Solution (Python):
import math

def a():
    x = list(map(int, input().split()))
    print(x.index(0) + 1)


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



def c():
    print('')



def d():
    print('')


b()

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

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

Solution (Python):
import sys
x,y=map(int,input().split())
if(y%2!=0):
    print("No")
    exit()
q=y-(2*x)
if q%2 or q<0:
    print("No")
    exit()
q=q//2
r=x-q
if r<0:
    print("No")
    exit()
print("Yes")

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

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

turu = (4 * X - Y) / 2
kame = X - turu

if turu >= 0 and kame >= 0:
    print("Yes")
else:
    print("No")

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

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

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

Solution (Python):
A = list(map(int, input().split()))
x=A[0]
y=A[1]
i=(y-2*x)/2
j=2*x-y/2
if i.is_integer() and j>=0 and  j.is_integer() and i>=0:
  print("Yes")
else:
  print("No")

Solution (Python):
num = list(map(int,input().split()))
if num[0]*2<=num[1]<=num[0]*4 and num[1]%2==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(0)


print('No')

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

Solution (Python):
"""
2 * a + 4 * 2 * (X - a) = Y
2a + 8X - 8a = Y
8X - 6a = Y


2 * turu + 4 * kame = Y
turu + kame = X
turu = X - kame

2(X - kame) + 4kame = Y
2X - 2kame + 4kame = Y
2X + 2kame = Y
2kame = Y - 2X
kame = (Y - 2X) / 2
"""


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

a = (Y - 2 * X) / 2

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

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

Solution (Python):
a,l=map(int,input().split())
if not (2*a<=l<=4*a) or l%2==1:
    print("No")
else:
    print("Yes")

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

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

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

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

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

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

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

a = np.array([[2, 4], [1, 1]])
b = np.array([y, x])
c, d = np.linalg.solve(a, b)
c = int(c)
d = int(d)

if c + d == x and c >= 0 and d >= 0:
    print("Yes")
else:
    print("No")

Solution (Python):
l= input().split(' ')
x= int(l[0])
y= int(l[1])

def f(x,y):
	if y%2==1:
		return 'No'
	for i in range(2*x, 4*x+1):
		if i==y:
			return 'Yes'
	return 'No'


print(f(x,y))

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

Solution (Python):

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

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

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

Solution (Python):
x, y = map(int,input().split())
kame = (y - 2*x) / 2
tsuru = x - kame
if kame.is_integer() and tsuru.is_integer():
  if kame > 0 and tsuru >= 0:
    print('Yes')
  elif tsuru > 0 and kame >= 0:
    print('Yes')
  else:
    print('No')
  exit()
else:
  print('No')

Solution (Python):
data = input().split()
x = int(data[0])
y = int(data[1])

if y % 2 != 0:
	print("No")
elif (2*x - 0.5*y) >= 0 and (-1*x + 0.5*y)>= 0:
	print("Yes")
else:
	print("No")

Solution (Python):
import sys
import math
def get_array(): return list(map(int,sys.stdin.readline().strip().split()))
def get_ints(): return map(int,sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
x,y=get_ints()
flag=0
if y%2!=0:
    flag=0
else:
    a=y//2 
    b=a-x
    a=x-b
    if a<0 or b<0:
        flag=0 
    else:
        flag=1 
if flag==1:
    print("Yes")
else:
    print("No")

Solution (Python):
X, Y = map(int, input().split())
if Y % 2 == 1:
  print("No")
  exit()

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



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

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

for i in range(x+1):

    if i * 2 + (x-i) * 4 == y:
        print("Yes")
        exit()

print("No")

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


if ((i[1]/2)-i[0] >= 0) and i[0]*4-i[1] >= 0 and i[1]%2 == 0:
    print("Yes")
else:
    print("No")

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

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

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

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

if x * 4 >= y and x * 2 <= y:
    print('Yes')
    exit()

print('No')

Solution (Python):
from sys import stdin


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


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

Solution (Python):
import sys
from math import sqrt, gcd, ceil, log
from bisect import bisect
from collections import defaultdict
inp = sys.stdin.readline
read = lambda: list(map(int, inp().strip().split()))





def solve():
	a, b = read()
	if 2*a <= b <= 4*a and b%2 == 0:
		print("Yes")
	else:
		print("No")





if __name__ == "__main__":
	solve()

Solution (Python):
from sys import stdin,stdout
x,y=map(int,stdin.readline().split())
if y&1:
    print('No')
    exit(0)
t=(y//2)-x
c=x-t
ans='Yes' if c>=0 and t>=0 else 'No'
print(ans)

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

Solution (Python):
import sys
import itertools

import time
import math
 
sys.setrecursionlimit(10 ** 7)
 
from collections import defaultdict
 
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(0, 101):
    for j in range(0, 101):
        if i + j == X:
            if i * 2 + j * 4 == Y:
                print("Yes")
                exit()
print("No")

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

Solution (Python):
import math
def main():
    x, y = map(int, input().split())
    a = (4*x-y)
    b = (y-2*x)

    am = 50
    bm = 25

    out = 'No'

    for a in range(0, am+1):
        for b in range(0, bm+1):
            Y = 2*a + 4*b
            X = a + b
            if X==x and Y==y:
                out = 'Yes'
    
    print(out)

main()

Solution (Python):
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

tin=lambda : map(int, input().split())
lin=lambda : list(tin())
mod=1000000007



def main():
	
	x, y = tin()
	
	for i in range(x+1):
		t=i
		k=x-i
		ashi=t*2 + k*4
		if ashi == y:
			return 'Yes'
	return 'No'
	
	
	

isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

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

if y%2:
    print('No')
elif y/4 <= x <= y/2:
    print('Yes')
else:
    print('No')

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

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

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

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

Solution (Python):
X, Y = map(int, input().split())
tsuru = 0
kame = 0
ans = 'No'

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

print(ans)

Solution (Python):
xy=input().split()
xy=[int(s) for s in xy]
x=int(xy[0])
y=int(xy[1])

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

if(r>0):
    print("Yes")
else:
    print("No")

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

ans = []

for i in range(0,X+1):
    ans += [[i, X-i]]

f = 0
for i in range(len(ans)):
    if 2*ans[i][0] + 4*ans[i][1] == Y :
        print('Yes')
        f = 1
        exit()
    else:
        continue

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

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

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

ret = (int(a) == a and int(b) == b) and (0<= a and 0 <= b)
print('Yes' if ret else 'No')

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

Solution (Python):
x, y = map(int, input().split())
if x*4 < y:
    print("No")
elif x*2 == y:
    print("Yes")
elif x*4 == y:
    print("Yes")
else:
    x *= 2
    while x < y:
        x += 2
        if x == y:
            print("Yes")
            exit()
    print("No")

Solution (Python):
def main():

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

        return ans


if __name__=="__main__":
        ans = main()
        print(ans)

Solution (Python):
from numpy.linalg import solve

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

left = [[2, 4],
        [1, 1]]
 
right = [int(Y), int(X)]
 
Ans = solve(left, right)




if Ans[0].is_integer() == True and Ans[1].is_integer() == True and Ans[0] >= 0 and Ans[1] >= 0:
  print("Yes")
else:
  print("No")

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

min, max = 0, 0
kq, kmod = divmod(y, 4)
tq, tmod = divmod(kmod, 2)
if tmod != 0:
        print('No')
        exit()
else:
        min = kq + tq

t2q, t2mod = divmod(y, 2)
if t2mod != 0:
        print('No')
        exit()
else:
        max = t2q

if x <= max and x >= min:
        print('Yes')
else:
        print('No')
        exit()

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

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

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

Solution (Python):

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


result = False
for i in range(0, Y//4+1):
    if Y == 2*(X-i) + 4*i:
        result = True
        break


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

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

Solution (Python):
int2=tuple(map(int,input().split()))
t=0
for a in range(0,int2[0]+1):
  for b in range(0,int2[0]+1):
    if a+b==int2[0] and 2*a+4*b==int2[1]:
      t+=1
      break
if t==0:
  print("No")
else:
  print("Yes")

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

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

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

else:
    result_list = []    
    
    for a in range(X+1):
        result_list.append(2 * a + 4 * (X - a) == Y)
    
    if any(result_list):
        print('Yes')
    else:
        print('No')

Solution (Python):
import sys
x, y = [int(i) for i in input().split()]
z = [0]*2

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

for i in range(1, x+1):
  z[0] += 2
  z[1] += 4

if y >= z[0] and y <= z[1]:
  print('Yes')
else:
  print('No')

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

ans = 0



for i in range(Y):
  for j in range(Y):
      if 2*i + 4*j == Y and i + j == X:
          ans +=1
        
    
if ans > 0:
  print('Yes') 
else:
  print('No')

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

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

Solution (Python):
import sys

x, y = map(int, input().split())
y -= (x * 2)

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

if(y == 0):
  print('Yes')
  sys.exit()

for i in range(x):
  y -= 2
  if(y == 0):
    print('Yes')
    sys.exit()

print('No')

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

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

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

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

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

flg = False
for i in range(101):
    for j in range(101):
        if (i * 2) + (j * 4) == y and (i + j) == x:
            print("Yes")
            flg = True
            break
    if flg == True:
        break
else:
    print("No")

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

test = ((4 * X) - Y) / 2

ans = ((4 * X) - Y) % 2

if ans == 0 and test >= 0 and test <= X:
    print('Yes')
else:
    print('No')

Solution (Python):
x,y=(int(x) for x in input().split())
if y>x*4:
    print('No')
elif y<x*2:
    print('No')
elif y%2==1:
    print('No')
else:
    print('Yes')

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

def check(x, y):
    
    for i in range(0, x+1):
        
        leg2_animal = i
        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)

Solution (Python):
s = input()
lst = s.split()

ex1 = int(lst[0])
ex2 = int(lst[1])
ret = "No"

for i in range(ex1+1):
    if 4 * (ex1 - i) + 2 * i == ex2:
        ret= "Yes"

print(ret)

Solution (Python):
S = input().split()
X = int(S[0])
Y = int(S[1])
max = X*4
min = X*2

if Y % 2 == 0 and min <= Y and Y <= max:
	print("Yes")
else:
	print("No")

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

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

Solution (Python):



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

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

Solution (Python):
x,y=map(int,input().split())
a,b=x*2-y//2,y//2-x
print('YNeos'[y%2 or a<0 or b<0::2])

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

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

print('No')

Solution (Python):
x,y = map(int,input().split())
if y % 2 != 0:
    print("No")
elif y % 2 == 0:
    s  = "A"
    for i in range(0,101):
        for j in range(0,101):
            if 2*i + 4*j == y and i + j == x:
                print("Yes")
                exit()
            else:
                s = "No"
    print(s)

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

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


if __name__ == '__main__':
    main()

Solution (Python):
X, Y = map(int, input().split())
t = Y - 2*X
u = 4*X - Y

if (t >= 0) & (t % 2 == 0) & (u >= 0) & (u % 2 == 0):
    print("Yes")
else:
    print("No")

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

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

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

for i in range(X+1):
    for j in range(X+1-i):
        S = Y - 2*i - 4*j
        if (i + j) > X:
            pass
        elif (i + j) is not X:
            pass
        elif S == 0:
            ans = 1
            break
        else:
            pass



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

Solution (Python):

x, y = map(int, input().split())
for i in range(x+1):
    crane = i
    turtle = x - i
    legs = 2 * crane + 4 * turtle
    if y == legs:
        print('Yes')
        exit()
print('No')

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

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

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

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

for a in range(100):
    for b in range(100):
        x = a + b
        y = 2 * a + 4 * b
        if x == X and y == Y:
            ans = "Yes"

print(ans)

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

tsuru = (Y-2*X)/2
kame = X - tsuru

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

    else:
        print("No")

else :
    print("No")

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    x, y = map(int, input().split())
    for i in range(x + 1):
        num = ((2 * i) + (4 * (x - i)))
        if y == num:
            print('Yes')
            exit()
    print('No')

if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
X,Y = map(int, input().split())
flg = 1
tsuru = X - ((Y - 2*X)/2)
amari = (float(Y) - float(2*X))%2
minus = (Y - 2*X)/2


if(amari > 0):
  flg = 0
elif(tsuru < 0):
  flg = 0
elif(minus < 0):
  flg = 0
else:
  flg = 1

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

Solution (Python):
XY = list(map(int, input().split()))
 
c = 2 * XY[0] - XY[1] / 2
t = - XY[0] + XY[1] / 2
 
if not (XY[1] / 2).is_integer():
  print('No')
elif c == 0 and t == 0:
  print('No')
elif c >= 0 and t >= 0:
  print('Yes')
else:
  print('No')

Solution (Python):
num = input().split()
x = int(num[0])
y = int(num[1])
cr = ((4 * x) - y) / 2
tur = (y - (2 * x)) / 2
if cr - int(cr) == 0 and tur - int(tur) == 0 and tur >= 0 and cr >= 0:
    if cr + tur == x and (2 * cr) + (4 * tur) == y:
        print("Yes")
else:
  print("No")

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

Solution (Python):
import sys

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


for i in range(100):
  for j in range(100):
    if i + j == X and 4*i + 2*j == Y:
      print("Yes")
      sys.exit()

print("No")

Solution (Python):
import numpy as np
num_list = []

def leg_num(c, t):
    return 2*c+4*t

for i in range(1, 101):
    leg_num_list = []
    for j in range(i):
        if leg_num(j, i-j) <= 100:
            leg_num_list.append(leg_num(j, i-j))
        if leg_num(i-j, j) <= 100:
            leg_num_list.append(leg_num(i-j, j))
    num_list.append(leg_num_list)

x, y = map(int, input().split(" "))
if y in num_list[x-1]:
    print("Yes")
else:
    print("No")

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.is_integer() and turtle >= 0 :
    crain = int(crain)
    print('Yes')
else:
    print('No')

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

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

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

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

if x*2 == y:
  print('Yes')
  exit()

if x*4 == y:
  print('Yes')
  exit()

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

print('No')

Solution (Python):
import sys
x,y=map(int,input().split())
if y%2:
  print('No')
  sys.exit()
a2=4*x-y
b2=y-2*x
if a2==0 and b2==0:
  print('No')
elif a2 < 0:
  print('No')
elif b2 < 0:
  print('No')
else:
  print('Yes')

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

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

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

kame = (2 * X) - (Y //2)
tsuru = (-1 * X) + (Y //2)

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

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

for x in range(0,101):
  for y in range(0,101):
    list1.append(x+y)
    list2.append(2*x+4*y)


for i in range(len(list1)):
  if list1[i] == X and list2[i] == Y:
    print('Yes')
    sys.exit()
print('No')

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

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


b = (y // 2) - x
a = x - b
s="No"
if y == 2 * a + 4 * b and a>=0 and b>=0:
    s="Yes"
print(s)

Solution (Python):
X, Y = map(int, input().split())
for T in range(100):
  for K in range(100):
    if (T+K) == X and (2*T) + (4*K) == Y:
      print("Yes")
      exit()
print("No")

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

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

Solution (Python):
x, y = map(int, input().split())
aa =  y - 2 * x
a = aa / 2
print('Yes' if 0 <= a <= x and aa % 2 ==0 else '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):
x_y = input().split()
x_y = [int(i) for i in x_y]
x = x_y[0]
y = x_y[1]


s = 0
a = False
while s != x+1:
    if (x-s)*4 + s*2 > y:
        if x == s:
            print('No')
            break
    elif (x-s)*4 + s*2 == y:
        print('Yes')
        break
    elif (x-s)*4 + s*2 < y:
        print('No')
        break
    s+=1

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

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


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

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

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

if X == 1:
  if Y == 2 or Y == 4:
    print('Yes')
  else:
    print('No')
  sys.exit()

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

if Y % 2 == 1:
  print('No')
 
elif Y / 4 > X:
  print('No')
  
elif a >= 0 and b >= 0:
  print('Yes')

else:
  print('No')

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

Solution (Python):
l = [int(i) for i in input().split()]

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

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

animal = 0
for i in range(x + 1):
    for j in range(x + 1):
        if i + j == x and 2*i + 4*j == y:
            animal += 1
        else:
            animal += 0

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

Solution (Python):
def resolve():
    X, Y = [int(i) for i in input().split()]
    if Y % 2 == 1:
        print("No")
    elif (Y < 2 * X) or (4 * X < Y):
        print("No")
    else:
        print("Yes")

resolve()

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


q, mod = divmod(foot, 4)

if foot % 2 ==1:
  print("No")
elif q > N :
  print("No")
elif  q == N and mod >= 2:
  print("No")
elif foot < N*2:
  print("No")
else:
  print("Yes")

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

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

Solution (Python):

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 == 0:
        print("Yes")
    elif not(ans == int(ans)):
        print("No")
    elif ans <= x and ans >= 1:
        print("Yes")
    else:
        print("No")

Solution (Python):
import sys
import math

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

turu = A[0] * 2
min_leg = A[1] - turu
kame = min_leg / 2
Ans = A[0] - kame

f, i = math.modf(Ans)
if f != 0.0:
    print("No")
    exit()

if Ans < 0 or Ans > A[0]:
    print("No")
else:
    print("Yes")

Solution (Python):
import numpy as np

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

A = np.array([1, 1, 4, 2]).reshape(2, 2)
v = np.array([X, Y]).reshape(2, 1)

u = np.dot(np.linalg.inv(A),v)

if u[0] < 0 or u[1] < 0:
    print("No")
elif np.linalg.norm(u - (u//1)) > 0.1:
    print("No")
else:
    print("Yes")

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

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