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

ii = lambda:int(input())
mi = lambda:list(map(int,input().split()))
ix = lambda x:list(input() for _ in range(x))
mix = lambda x:list(mi() for _ in range(x))
iix = lambda x:list(int(input()) for _ in range(x))


def resolve():
    x,y = mi()
    minval = x * 2
    maxval = x * 4
    invalid  = 1
    if minval<= y and y <= maxval and y%2 == 0:
        invalid = 0
    print("No" if invalid else "Yes")

if __name__ == "__main__":
    resolve()

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

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

Solution (Python):
from sys import stdin
data = stdin.readline().rstrip()

x = int(data.split()[0])
y = int(data.split()[1])

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

Solution (Python):
x,y = map(int,input().split())
t = y/2 - x

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

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

if (2*X <= Y and Y <= 4*X and Y%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()

print("No")

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

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

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

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

Solution (Python):
def main():
    X, Y = map(int, input().split())
    turtle = (Y - X * 2) / 2
    if turtle.is_integer() and 0 <= turtle <= X:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

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

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

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

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

ans = "No"
for i in range(101):
    for j in range(101):
        if i + j == X and i * 2 + j * 4 == Y:
            ans = "Yes"

print(ans)

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

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

Solution (Python):
def main():
	a,b = map(int,input().split())
	av = 0
	for kame in range(101):
		for tsuru in range(101):
			if kame + tsuru == a and 4*kame + 2*tsuru == b:
				print("Yes")
				av = 1
				break
	if av == 0:
		print("No")
	


if __name__ == '__main__':
	main()

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

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

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

ans = "No"
for n_tr in range(0, x + 1):
    n_km = x - n_tr
    if y == n_tr*2 + n_km*4:
        ans = "Yes"
        break

print(ans)

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

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

print(ans)

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

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

Solution (Python):
import sys

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

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

print("No")

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

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

for i in range(x+1):
    j = x - i
    if 2*i + 4*j == y:
        print('Yes')
        exit()
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):
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())
f = False
for a in range(x+1):
  b=x-a
  if 2*a + 4*b == y:
    if not f:
      print("Yes")
      f = True

if not f:
  print("No")

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

Solution (Python):
x,y=input().split()
x
mat="No"
for i in range (0,101):
    for j in range(0,101):
        if i*2+j*4==int(y) and i+j==int(x):
            mat="Yes"

print(mat)

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

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

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

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

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

if n*2 <= x <= n*4:
    if x % 2 == 0:
        print('Yes')
        exit(0)

print('No')

Solution (Python):
x,y=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)

Solution (Python):
x, y = map(int, input().split())
s = 'No'
if 2 * x > y or 4 * x < y:
  s = 'No'
elif y % 2 != 0:
  s = 'No'
elif 2 * x == y or 4 * x == y:
  s = 'Yes'
elif (4*x - y) // 2 <= x:
  s = 'Yes'
else:
  s = 'No'

print(s)

Solution (Python):

import sys

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

crane = (4*X - Y) / 2
tortoise = (-2*X + Y) / 2

if (crane == tortoise == 0) or \
   (crane % 1 != 0) or (tortoise % 1 != 0):
    print("No")
    sys.exit()

if (0 <= crane <= 100) and (0 <= tortoise <= 100):
    print("Yes")
else:
    print("No")

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

if __name__ == '__main__':
    main()

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

Solution (Python):
X,Y=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)

Solution (Python):

import sys
input = lambda: sys.stdin.readline().strip()
x, y = [int(x) for x in input().split()]
print('Yes' if any(c * 2 + (x - c) * 4 == y for c in range(x + 1)) else 'No')

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

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

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

tf = False
for a in range(X + 1):
  b = X - a
  if a * 2 + b * 4 == Y:
    tf = True
    break

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

Solution (Python):
animals_num, legs_num = map(int, input().split())

answer = "No"

for i in range(animals_num + 1):
  j = animals_num - i
  if j * 4 + i * 2 == legs_num:
    answer = "Yes"
print(answer)

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

Solution (Python):
def resolve():
    X, Y = list(map(int, input().split()))
    a, b = 0, 0
    for a in range(X+1):
        b = X - a
        if 2 * a + 4 * b == Y:
            print('Yes')
            return
    print('No')
    return

resolve()

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

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

x = xy[0]
y = xy[1]

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

Solution (Python):
X, Y = 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)

Solution (Python):
x, y = 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)

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

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

print(result)

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

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

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

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

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

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

if a.is_integer() and b.is_integer() and a>=0 and b>=0:
    print("Yes")
else:
    print("No")

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

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

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

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

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

Solution (Python):
X, Y = map(int,input().split())
ans = 0
flag = False
for turu in range(X+1):
    for kame in range(X+1):
        if kame*4 + turu*2 == Y and turu+kame == X:
            print("Yes")
            flag = True
            break
        elif turu+kame == 2*X:
            print("No")
            flag = True
            break
    if flag:
        break

Solution (Python):
x, y = map(int, input().split())
ans = False
for i in range(x + 1):
    sum = 2 * (x - i) + 4 * i
    if sum == y:
        ans = True
    elif sum > y:
        break

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

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

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

Solution (Python):
n,l = map(int,input().split())
count = 0 

for i in range(n+1):
  if 4*i+2*(n-i)-l == 0:
    print("Yes")
    count = 1
    break

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

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


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

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

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

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

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


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

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

ans = False

for c in range(x+1):
    t = x - c 
    LEG = 2*c + 4*t

    if LEG == y:
        ans = True
        break

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

Solution (Python):




import sys
import math

iimr = lambda: map(int, sys.stdin.readline().rstrip().split())
readline = sys.stdin.readline
sys.setrecursionlimit(10 ** 8)

kame = 4
tsuru = 2

def 関数(x, y):
    if (x * 4) < y or (x * 2) > y:
        return "No"
    else:
        
        for a in range(x+1):
            for b in range(x+1):
                ax = a * 4
                bx = b * 2
                
                if (bx + ax) == y and (a + b) == x:
                    
                    
                    return("Yes")

    return("No")
                    

def çözmek():
    X,Y = map(int, sys.stdin.readline().split())

    res = []
    res.append(関数(X,Y))
    print(*res, sep="\n")

if __name__ == "__main__":
    çözmek()

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

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

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

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

all_kame = y - 2*x

if all_kame < 0:
    print("No")
    
elif all_kame == 0:
    print("Yes")
    
else:
    for i in range(x+1):
        if all_kame - 2*(x-i) ==0:
            print("Yes")
            exit()
    print("No")

Solution (Python):
x,y = map(int,input().split())
p = []
ans = 0

for i in range(x):
    p.append(4)

for a in range(x):
    if sum(p)==y:
        ans = 1
        break
    else:
        p.remove(4)
        p.append(2)
if ans == 0:
    if sum(p)==y:
        ans = 1

if ans == 1:
    print('Yes')
else:
    if (y==2)&(x==1):
        print('Yes')
    if (y==4)&(x==1):
        print('Yes')
    else :
        print('No')

Solution (Python):
X, Y = [int(num) for num in input().split()]
b = (Y - 2*X) / 2
if 2*X > Y or Y > 4*X:
  print("No")
else:
  if int(b) == b:
  	print("Yes")
  else:
  	print("No")

Solution (Python):
x, y = map(int, input().split())
ans = 'No'
if y in range(x*2, (x*4)+1):
    if y%2==0:
        ans='Yes'

print(ans)

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








if y%2==0 and math.ceil((y/2)/2)<=x and x<=(y/2):
    print('Yes')
else:
    print('No')

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

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

print("No")

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

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

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

Solution (Python):
x, y = map(int, input().split())
ans="No"
if y in range(x*2, (x*4)+1):
    if y%2==0:
        ans="Yes"
print(ans)

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

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

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

Solution (Python):
X, Y= 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)

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 9)

def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')







def solve():
    X, Y = MI()

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

if __name__ == '__main__':
    solve()

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

Solution (Python):
X, Y= 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)

Solution (Python):

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

tmp_legs = x * 4
diff = tmp_legs - y

if diff < 0:
    print("No")
    exit()
elif diff == 0:
    print("Yes")
    exit(0)

head_crane = diff//2

if diff/2 - head_crane != 0:
    print("No")
    exit()
elif head_crane > x:
    print("No")
    exit()

print("Yes")

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):
x,y = map(int,input().split())
if y % 2 == 1:
  print("No")
elif 2*x <= y <= 4*x:
  print("Yes")
else:
  print("No")

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

def main():
    X, Y = map(int, input().split())
    tmp = X * 4 - Y
    if tmp%2 != 0:
        print("No")
        return
    turu = tmp // 2
    kame = X - turu
    if turu >= 0 and kame >= 0:
        print("Yes")
        return
    print("No")


if __name__ == "__main__":
    main()

Solution (Python):
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy

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


if __name__ == "__main__":
    main()

Solution (Python):
x, y = input().split()
x = int(x)
y = int(y)
for k in range(min(x, (y + 1) // 4),-1,-1):
    r = 4 * k
    t = (y - r) // 2
    r += t * 2
    if k + t == x and r == y:
        print('Yes')
        break
else:
    print('No')

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

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

Solution (Python):
X, Y = 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)

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

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

Solution (Python):
a, b = map(int, input().split())
c = (b - 2*a)/2
d = (4*a-b)/2
if c + d == a and 4*c + 2*d == b and c % 1 == 0 and d % 1 == 0 and c>= 0 and d>= 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 + b == x and 4*a + 2*b == y and a % 1 == 0 and b % 1 == 0 and a>= 0 and b>= 0:
  print("Yes")
else : 
  print("No")

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

Solution (Python):
X, Y = map(int,input().split())
ans = 'No'
if 4*X < Y:
    print(ans)
else:
    for i in range(1,X+1):
        crane = i
        turtle = X - i
        crane2 = X - i
        turtle2 = i
        if 2*crane + 4*turtle == Y or 2*crane2 + 4*turtle2 == Y:
            ans = 'Yes'
            break
    print(ans)

Solution (Python):
X,Y = map(int,input().split())
tsuru = 0
kame = X
ashi = 0
flag = False
for i in range(X+1):
    ashi = tsuru * 2 + kame * 4
    if(Y == ashi):
        flag = True
        break
    tsuru+=1
    kame-=1

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

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

Solution (Python):


x, y = map(int, input().split())
res = "No"

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

print(res)

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

flag = 0

for i in range(xy[0] + 1):
  total = i * 2 + (xy[0] - i) * 4
  if total == xy[1]:
    flag = 1
    break

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

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

Solution (Python):
X,Y=(map(int,input().split()))
C,T=2*X-Y/2,Y/2-X
x1,x2=C.is_integer(),T.is_integer()
if x1==x2==True and C>=0 and T>=0:
    print('Yes')
else:
    print('No')

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

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

Solution (Python):
a,l=map(int,input().split())
ans="No"
for j in range(a+1):
  b=a-j
  if (4*a)-(2*b)==l:
    ans="Yes"
print(ans)

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

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

print("No")

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

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

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

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

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

Solution (Python):
x, y = list(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())
ans = 'No'
for a in range(X + 1):
  b = X - a
  if 2 * a + 4 * b == Y:
    ans = 'Yes'
print(ans)

Solution (Python):
import sys


def log(s):
    
    pass


def output(x):
    print(x, flush=True)


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


def main():
    x, y = tuple(input_ints())
    
    

    r = False
    for t in range(x+1):
        k = x - t
        if 2 * t + 4 * k == y:
            r = True
            break

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

main()

Solution (Python):
def solve(x, y):
    for i in range(x+1):
        if 2*i + 4*(x-i) == y:
            return "Yes"
    return "No"

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

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

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

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

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

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

Solution (Python):
X, Y = 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)

Solution (Python):
X, Y = 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)

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

Solution (Python):
def main():
    X, Y = map(int, input().split())
    remain = Y - 2 * X
    ans = True
    if remain < 0:
        ans = False
    if remain % 2 != 0:
        ans = False
    if remain//2 > X:
        ans = False
    print('Yes' if ans else 'No')

if __name__ == '__main__':
    main()

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

    for n_cranes in range(X+1):
        n_turtles = X - n_cranes

        if n_cranes * 4 + n_turtles * 2 == Y:
            return 'Yes'

    return 'No'


def main():
    print(solve())


if __name__ == "__main__":
    main()

Solution (Python):
head, leg = [int(idx) for idx in input().split()]
crane = 2
turtle = 4
for idx in range(0,head+1):
  ans1 = 0
  ans2 = 0
  ans1 = crane*idx
  ans2 = turtle*(head-idx)
  if ans1 + ans2 == leg:
    print('Yes')
    break
  elif idx == head:
    print('No')

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

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

Solution (Python):

import sys

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

YES = "Yes"  
NO = "No" 

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

print(NO)

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

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

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

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

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

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

x = (4*b[0] - b[1])/2
y = (b[1] - 2*b[0])/2
if x >= 0 and y >= 0 and (x - int(x)) == 0 and (y - int(y)) == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
N, Y = map(int, input().split())
 
for i in range(N + 1):
  
  j = N -i
  x = (4 * i) + (2 * j)
  if x == Y:
    print("Yes")
    sys.exit()
      
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):
x,y = map(int,input().split())
kame=(y//2)-x
if y%2!=0:
    print("No")
elif (kame>=0)&(kame<=x):
    print("Yes")
else:
    print("No")

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

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

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()) 
ans = 'No'
for a in range(X + 1):
	b=X-a
	if 2 * a + 4 * b == Y:
		ans = 'Yes' 
print(ans)

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

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

Solution (Python):


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

exist = False
for k in range(X + 1):
    if (k * 4 + (X - k) * 2) == Y:
        exist = True

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

Solution (Python):
x,y=map(int,input().split())
for i in range(x+1):
    if i*2+(x-i)*4==y:
        print("Yes")
        break
else: 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'
print(ans)

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

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

if a % 2 == 0 and a >= 0:
  if b % 2 == 0 and b >= 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())
for i in range(x+1):
  a=2*i+4*(x-i)
  if a==y:
    print("Yes")
    exit()
print("No")

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

Solution (Python):

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

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

print(flag)

Solution (Python):
x,y=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)

Solution (Python):


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

t = 0.5 * Y - X

c = 2 * X - 0.5 * Y

if(t == int(t) and t >= 0 and c == int(c) and c >= 0):
    print("Yes")
else:
    print("No")

Solution (Python):
X, Y = [int(x) for x in input().split()]
check = True
if X*4 < Y:
    print('No')
elif Y < 2*X:
    print('No')
elif Y%2==1:
    print('No')

else:
    print('Yes')

Solution (Python):
X, Y = [int(x) for x in input().split()]
check = True
if X*4 < Y:
    check = False
elif Y < 2*X:
    check = False
elif Y%2==1:
    check = False

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

Solution (Python):
n,k = map(int,input().split())
for kame in range(n+1):
  if k == kame*4 + (n-kame)*2:
    print("Yes")
    break
else:
  print("No")

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

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

else:
    for a in range(X + 1):
        for b in range(X + 1 - a):
            if 2*a + 4*b == Y and a + b == X:
                print('Yes')
                exit()
            else:
                pass

    print('No')

Solution (Python):
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
x,y=map(int,stdin.readline().split())
poss=True
if(y%2==1):
    poss=False
elif(y<2*x):
    poss=False
elif(y>4*x):
    poss=False
if(poss):
    print("Yes")
else:
    print("No")

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

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

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