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-----
3 8

-----Sample Output-----
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.

Difficulty: introductory

Starter code:

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

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

x,y=(int(x) for x in input().split())

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

else:
	print('No')

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

x, y = list(map(int, input().split()))
if y % 2 == 1:
    print("No")
    return

q2 = y // 2
q4 = y // 4
n = 0
for i in range(q4 + 1):
    n = q2 - i
    if n == x:
        print("Yes")
        return

print("No")


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

flag = True
for kame in range(X + 1):
    tsuru = X - kame
    if (4 * kame + 2 * tsuru == Y):
        print('Yes')
        flag = False
        break

if(flag):
    print('No')


X,Y=map(int,input().split());print("NYoe s"[(2<=Y/X<=4)*~Y&1::2])

x, y = list(map(int, input().split()))
for i in range(101):
    for j in range(101):
        if i + j == x:
            if 2*i + 4*j == y:
                print("Yes")
                return
print("No")


y = [int(i) for i in input().split()]

N = y[0]
Q = y[1]

if(Q&1): print("No")
elif(Q>=N*2 and Q<=N*4): print("Yes")
else: print("No")


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

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

print("No")

a,b = input().split(" ")

ans = 0
for i in range(int(a)+1):
  turu = int(i)
  turt = int(a) - int(i)
  
  if turu*2 + turt*4 == int(b):
    ans = 1
    break

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


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

X = list(map(int,input().split()))
legs = 0
flag = 0
for crane in range(X[0]+1):
  turtle = X[0]-crane
  legs = crane*2 + turtle*4
  if(X[1] == legs):
    flag = 1
    break
if(flag == 1):print("Yes")
else:print("No")

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

ans = 'No'

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

print(ans)


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


numline = input().split(" ")
a=int(numline[0])
b=int(numline[1])

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

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

ans = "No"

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

print(ans)

def main():
  X,Y = map(int,input().split())
  for x in range(101):
    for y in range(101):
      if x+y==X and 2*x+4*y==Y:
        return True
  return False

def __starting_point():
  print("Yes" if main() else "No")
__starting_point()

X,Y=map(int,input().split());print("NYoe s"[2<=Y/X<=4&~Y*4::2])

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

flag = False
for i in range(100):
  for j in range(100):
    if i+j == X and 2*i+4*j == Y:
      flag = True

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

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


X,Y = map(int,input().split())
result="No"
for a in range(X+1):
  b = X-a
  if 2*a+4*b==Y:result="Yes"
print(result)

x,y=map(int,input().split())
i=0
while i<=x:
  if y==2*i+4*(x-i):
    print('Yes'); return;
  i+=1
print('No')

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

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


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

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

X,Y=map(int,input().split())
num=0
for a in range(X+1):
  if 2*a+4*(X-a)==Y:
    num=num+1
if num>=1:
  print("Yes")
else:
  print("No")

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

print('Yes' if ans == 1 else 'No')

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

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


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

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

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time, copy,bisect
#from operator import itemgetter
#from heapq import heappush, heappop
#import numpy as np
#from scipy.sparse.csgraph import breadth_first_order, depth_first_order, shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
#from scipy.sparse import csr_matrix
#from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
import sys

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

stdin = sys.stdin

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

X, Y = na()
ans = 'No'
for turu in range(X+1):
    kame = X - turu
    if turu * 2 + kame * 4 == Y:
        ans = 'Yes'
        break
print(ans)

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


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

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

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

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)

X,Y = (int(x) for x in input().split())
a = 4*X-Y
b = Y-2*X
if a>=0 and b>=0 and a%2==0 and b%2==0:
  print('Yes')
else:
  print('No')

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


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


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

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

#B問題

#x匹　y本

x, y = map(int, input().split())
counter = 0
# iは鶴　jは亀
for i in range(0,x+1):
    j = x - i
    if (2*i + 4*j == y):
        counter += 1
        break
if counter >= 1:
    print("Yes")
else:
    print("No")

import sys
from collections import deque, defaultdict, Counter
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush
from math import ceil, floor, sqrt, gcd, inf
from copy import deepcopy
import numpy as np
import scipy as sp

INF = inf
MOD = 1000000007

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

tmp = 0
res = "No"

for i in range(x + 1):
    j = x - i
    if 2 * i + 4 * j == y:
        res = "Yes"

print(res)


x, y = map(int, input().split())
msg = 'No'
for a in range(1, x+1):
    if 2*a + 4*(x-a) == y or 4*a + 2*(x-a) == y:
        msg = 'Yes'
print(msg)

X, Y = map(int,input().split())
# 合計X匹、足Y本

if Y % 2 == 1:
  print('No')
else:
 for num_turu in range(X+1):
   num_kame = X - num_turu
   if Y == 4 * num_kame + 2 * num_turu:
     print('Yes')
     break
 else:
  print('No')

animals_and_legs=input()
list=animals_and_legs.split()
animals=int(list[0])
legs=int(list[1])
j=animals
i=0
something=True
while i<=animals:
    if i*4+j*2==legs:
        print("Yes")
        something=False
        break
    i=i+1
    j=j-1
if something is True:
    print("No")



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

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

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

T = 0
K = 0

for i in range(X + 1):
    j = X - i

    if 2 * i + 4 * j == Y:
        print("Yes")
        return
print("No")


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

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



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

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


def __starting_point():
    main()
__starting_point()

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

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

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

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

print(ans)



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

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


x,y = map(int,input().split())
cnt = 0
for b in range(x+1) :
    for t in range(x+1) :
        if x == b+t and y == 2*b+4*t :
            print('Yes')
            return
        else :
            continue
print('No')

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

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

if y % 2 != 0:
    print('No')
    return
if x*2 <= y <= x*4:
    print('Yes')
else:
    print('No')


X,Y=list(map(int,input().split()))
for i in range(100):
    for j in range(100):
        if i+j==X and 2*i+4*j==Y:
            print("Yes")
            break
    else:
        continue
    break
else:
    print("No")


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

r = range(2*X, 4*X+2, 2)

for i in r:

  if i == Y:
    count += 1

print('Yes' if count > 0 else 'No')

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

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


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

cnt = 0

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

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


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

if Y % 2 == 0:
    K = Y//2 - X
    if K >= 0:
        if X - K >= 0:
            print("Yes")
            return

print("No")


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

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


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

for i in range(1,X+1):
  a=i*2
  b=Y-a
  c=b//2
  d=b//4
  if c+i==X or d+i==X:
    if b%2==0 or b%4==0:
      print("Yes")
      return
    
print("No")

x,y=map(int,input().split())
print(['No','Yes'][y%2==0 and 2*x <= y <= 4*x])

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

for a in range(x + 1):
    b = x - a 

    if (2 * a + 4 * b) == y:
        print('Yes')
        return

print('No')


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

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

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

ans = 'No'

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

print(ans)

import sys
vol, foot = map(int,input().split())
for i in range(vol + 1):
    if 2*i + 4*(vol-i) == foot:
        print("Yes")
        return

print("No")

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

ans = 0

if Y/2 == X: ans = 1

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

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

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

print(ans)


X,Y = (int(x) for x in input().split())
Flag = False
for A in range(0,X+1):
    B = X-A
    if 2*A+4*B==Y:
        Flag = True
        break
print(['No','Yes'][Flag])

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

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

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

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

a,b = list(map(int,input().split()))
leg  = 0
for i in range(0,a+1):
    if 2*i +4*(a-i) == b:
        print('Yes')
        return
print('No')



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

x, y = map(int, input().split())
b = (y/2 - x)
a = x - b
if y % 2 != 0:
    print('No')
elif b < 0:
    print('No')
elif a >= 0:
    print('Yes')
else:
    print('No')

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

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

x,y=map(int,input().split())
n="No"
for i in range(51):
    for j in range(26):
        if 2*i+4*j==y:
            if i+j==x:
                n="Yes"
print(n)

def answer(x: int, y: int) -> str:
    if x * 2 <= y <= x * 4 and y % 2 == 0:
        return 'Yes'
    return 'No'


def main():
    x, y = map(int, input().split())
    print(answer(x, y))


def __starting_point():
    main()
__starting_point()


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

l = []
flag = False

for i in range(x+1):
    l.append((i,x-i))

for xx,yy in l:
    if y == (xx*2+yy*4):
        flag = True
        break
if flag:
    print("Yes")
else:
    print("No")

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

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

x, y = list(map(int,input().split()))
cnt = 0
for a in range(x + 1):
    b = x - a
    if b >= 0 and 2 * a + 4 * b == y:
        ans = 'Yes'
        break
else:
    ans = 'No'

print(ans)



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



def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(map(int, input().split()))
def i_row(N): return [int(input()) for _ in range(N)]
def i_row_list(N): return [list(map(int, input().split())) for _ in range(N)]

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

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

X,Y = map(int,input().split())
result="No"
for i in range(0,100):
  for j in range(0,100):
    if i+j==X and i*2+j*4==Y:result="Yes"
print(result)

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

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

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

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

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

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

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

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

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

x,y=map(int,input().split())
n="No"
for i in range(51):
    for j in range(26):
        if 2*i+4*j==y:
            if i+j==x and i+j!=0:
                n="Yes"
print(n)