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

l = []
c = 2 * x
l.append(c)
for nn in range(x):
    c += 2
    l.append(c)

flag = False
for ll in l:
    if ll == y:
        print("Yes")
        flag = False
        break

    else:
        flag = True

if flag:
    print("No")

Solution (Python):
def I(): return int(input())
def LI(): return list(map(int,input().split()))
def MI(): return map(int,input().split())
def LLI(n): return [list(map(int, input().split())) for _ in range(n)]









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

Solution (Python):


import math

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

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

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

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

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

def hantei(list):
    
    

    a = 0
    count = 0
    while a <=100:
        for b in range(101):
            if a + b == list[0] and 2 * a + 4 * b == list[1]:
                print("Yes")
                count = 1
                break
        a += 1
        if count == 1:
            break
        elif count == 0 and a >= 100:
            print("No")
            break 

hantei(A)

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

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

Solution (Python):
a,b=[int(x) for x in input().split(" ")]
x=(b-2*a)/2
y=(4*a-b)/2
print("Yes" if x>=0 and y>=0 and x%1==0.0 and y%1==0.0 else "No")

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

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

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

if(2*c+4*b==Y and (Y-a)%2==0 and c>=0 and b>=0):
    print("Yes")
else:
    print("No")

Solution (Python):
X, Y = list(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())
print('Yes') if 0 <= (4 * x - y) / 2 <= x and (4 * x - y) % 2 == 0 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):
xy = [int(s) for s in input().split()]
x = xy[0]
y = xy[1]

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

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

Solution (Python):
XY = [int(s) for s in input().split()]
X = XY[0]
Y = XY[1]

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

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

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

Solution (Python):
x,y = map(int,input().split())
A = y//2
B = (x-A)
while A>-1:
    if y==2*A + 4*B:
        print("Yes")
        break
    A = A-1
    B = B+1
    if A==-1:
        print("No")

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

ans = "No"

for turtle in range(X+1):
  crain = X - turtle
  if 2 * crain + 4 * turtle == Y:
    ans = "Yes"

print(ans)

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

Solution (Python):
import sys
X, Y = map(int, input().split())
for i in range(X+1):
  j = X - i
  if 2*i+4*j == Y:
    print('Yes')
    sys.exit()
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())

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

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

Solution (Python):
def Qb():
    ans = 'No'
    x, y = map(int, input().split())
    for b in range(0, x + 1):
        z = y - (4 * b)
        if z % 2 == 0 and x == (z / 2 + b):
            ans = 'Yes'
            break
    print(ans)


if __name__ == "__main__":
    Qb()

Solution (Python):
M,N = map(int,input().rstrip().split(" "))
ans=False
for a in range(M + 1):
    b=M-a
    if 2 * a + 4 * b == N:
        ans=True
if ans:
    print("Yes")
else:
    print("No")

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

def f(X, Y):
    for i in range(X + 1):
        for j in range(X + 1):
            kame = i
            tsuru = j
            if kame + tsuru == X and kame * 4 + tsuru * 2 == Y:
                return 'Yes'
    return 'No'

print(f(X, Y))

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

def f(X, Y):
    for i in range(X + 1):
        for j in range(X + 1):
            kame = i
            tsuru = j
            if kame + tsuru == X and kame * 4 + tsuru * 2 == Y:
                return 'Yes'
    return 'No'

print(f(X, Y))

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

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

Solution (Python):
def main(X, Y):
    for n_crane in range(X + 1):
        n_turtle = X - n_crane
        y = n_crane * 2 + n_turtle * 4
        if y == Y:
            print('Yes')
            return
    print('No')


if __name__ == "__main__":
    X, Y = [int(s) for s in input().split(' ')]
    main(X, Y)

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







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

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

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

Solution (Python):
flag = False
n, y = list(map(int, input().split()))
for i in range(0, n):
        if i*2 + (n-i) * 4 == y or i*4 + (n-i)*2 ==y:
            flag = True
            break

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

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

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

Solution (Python):
X, Y = map(int, input().split())
n = 0
t_leg = 2
k_leg = 4

for i in range(101):
    for s in range(101):
        if X - i - s == 0 and Y - 2 * i - 4 * s == 0:
            n += 1

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

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

cont = 0

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

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

Solution (Python):
tmp = input().split(" ")
total = int(tmp[0])
leg = int(tmp[1])
 
if leg % 2 == 0 and 4 * total >= leg >= 2 * total:
  print("Yes")
else:
  print("No")

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

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

ans = 0

for n in range(x+1):
    kame = x - n

    tsuru_leg = n*2
    kame_leg = kame*4

    if y == (tsuru_leg+kame_leg):
        ans = ans + 1

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

Solution (Python):
a,b=map(int,input().split())
c=0
for i in range (0,a+1):
  for j in range (0,a+1):
    if (i+j)==a and (i*2 + j *4) == b:
      c+=1
if c== 0:
  print('No')
else:
  print('Yes')

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

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

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

if Z % 2 == 0 and X * 2 >= Z >= 0:
	print('Yes')
else:
	print('No')

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


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


calc()

Solution (Python):

X, Y = map(int, input().split())
for i in range(X+1):
    for j in range(X+1):
        if X * 2 <= Y:
            if Y % 2 == 0:
                if (i * 2) + (j * 2) == Y:
                    print('Yes')
                    exit()
print('No')

Solution (Python):
def solve(x, y):
    
    
    
    
    
    p2 = 4 * x - y
    q2 = -2 * x + y
    if p2 % 2 == 0 and q2 % 2 == 0 and p2 >= 0 and q2 >= 0:
        return "Yes"
    return "No"


def main(istr, ostr):
    x, y = list(map(int, istr.readline().strip().split()))
    result = solve(x, y)
    print(result, file=ostr)


if __name__ == "__main__":
    import sys

    main(sys.stdin, sys.stdout)

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

crane = 0
turtle = X

while turtle >= 0:

    allLegs = crane * 2 + turtle * 4
    if allLegs == Y:
        print("Yes")
        exit()

    crane += 1
    turtle -= 1

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

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

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

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

ans = 'No'

for tsuru in range(x+1):
  kame = x - tsuru
  if tsuru * 4 + kame * 2 == y:
    ans='Yes'
  else:
    pass

print(ans)

Solution (Python):

N, K = map(int, input().split())

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

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

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








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

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

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):
import sys
def Ii():return int(sys.stdin.readline())
def Mi():return map(int,sys.stdin.readline().split())
def Li():return list(map(int,sys.stdin.readline().split()))

x,y = Mi()
if y%2 == 1:
  print('No')
  exit(0)
  
y = y//2

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

Solution (Python):
import sys

input = sys.stdin.readline

n, l = list(map(int, input().split()))

t = (l//2) - n
c = (l//2) - (2*t)

if l % 2 == 1:
    print("No")
elif t < 0 or c < 0:
    print("No")
elif t > n or c > n:
    print("No")
elif t + c != n:
    print("No")
else:
    print("Yes")

Solution (Python):
x, y = map(int, input().split())
for a in range(0, 101):
    for b in range(0, 101):
        if a + b == x and 2*a + 4*b == y:
            print('Yes')
            exit()
print('No')

Solution (Python):

def check(x,y):
  for i in range(100):
    for j in range(100):
        if i+j==x and i*4+j*2==y :
            return "Yes"
  return "No"

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

Solution (Python):
n_all,leg_all=map(int, input().split())

for i in range(n_all+1):
    leg_kame=2*(n_all-i)
    leg_turu=4*i
    if leg_kame+leg_turu==leg_all:
        print('Yes')
        break
    else:
        continue
else:(print('No'))

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

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

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

if (int(t) -t == 0) and (t>=0) and (k>=0):
  print('Yes')
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=list(map(int, input().split()))
if x[0]*2<=x[1]<=x[0]*4 and x[1]%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):


def main():

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

    if Y % 2 == 0 and X * 2 <= Y and Y <= X * 4:
        ans = 'Yes'

    else:
        ans = 'No'

    print(ans)


if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
numbers = input().split(" ")
num = int(numbers[0])
foot = int(numbers[1])
if foot % 2 == 0:
  if num * 2 <= foot <= num * 4:
    print("Yes")
  else:
    print("No")
else:
  print("No")

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

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

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

Solution (Python):
def solve(arr):
    t1 = arr[1]/2 - arr[0];
    t2 = 2*arr[0] - arr[1]/2;
    if arr[1]%2==1 or t1<0 or t2<0:
        return "No"
    return "Yes"
        

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

print(solve(arr))

Solution (Python):
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)

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

if y-2*x>=0 and (y-2*x)%2==0 and x-(y-2*x)/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):
x,y=(int(i) for i in input().split())

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

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

result = 'No'
li = []
for i in range(X):
    li.append(4)
if sum(li) == Y:
    result = 'Yes'
else:
    for i in range(X):
        li[i] = 2
        if sum(li) == Y:
            result = 'Yes'
            break

print(result)

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

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

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

is_int = (a.is_integer() and b.is_integer())
is_positive = (a >= 0 and b >= 0)
if is_int and is_positive and (a + b) == X and (2*a + 4*b) == Y:
    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):
x,y = map(int , input().split())

t = 2
k = 4

flg = "No"
for i in range(x+1):
    if t*i + k*(x-i) == y:
        flg = "Yes"

print(flg)

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

t = 2
k = 4

flg = False
for i in range(x):
    if t*i + k*(x-i) == y or t*(x-i) + k*i == y:
        flg = True

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

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

allK = X*4

if (allK - Y) < 0 or (allK - Y)/2 > X or Y%2 == 1:
    print('No')
else:
    print('Yes')

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

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

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 math
def facts(n):
    ans = []
    for  i in range(1, int(math.sqrt(n)+1)):
        if(n%i==0):
            ans.append(i)
            ans.append(n//i)
    ans = sorted(list(dict.fromkeys(ans)))
    if(ans[-1]==n):
        ans = ans[:-1]
    return ans

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

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

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

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

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

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

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

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

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

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

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

if turu >= 0 and turu.is_integer() and kame >= 0 and kame.is_integer():
    print('Yes')
else:
    print('No')

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

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

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

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

Solution (Python):
import sys
import numpy as np

def Ss():
  return sys.stdin.readline().rstrip().split(' ')

def Is():
  ss = Ss()
  return map(int, ss) if len(ss) > 1 else int(ss[0])

a, l = Is()

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

Solution (Python):
'''
In the name of God
'''

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

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

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

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

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

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

Solution (Python):

def inputlist(): return [int(j) for j in input().split()]

X,Y = inputlist()
x = (4*X-Y)/2
y = (Y-2*X)/2
if x >= 0 and y >= 0 and x.is_integer() and y.is_integer():
    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')
        break
else:
    print('No')

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

flag = False
for i in range(x + 1):
  legs = i * 2 + (x - i) * 4
  if legs == y:
    flag = True
    break
if flag:
  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 = map(int, input().split())
cnt = 0
for i in range(x+1):
    for j in range(x+1):
        if (i + j == x) and (2*i + 4*j == y):
            cnt += 1
                
if cnt >= 1:
    print('Yes')
else:
    print('No')

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

tsuru=x*2
sa=y-tsuru
a=sa/2

if sa%2!=0:
  print('No')
elif a>x:
  print('No')
elif tsuru>y:
  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())

result = False

for i in range(X + 1):
    turu = i
    kame = X - i
    if Y == turu * 2 + kame * 4:
        result = True
        break

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

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

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

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

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

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

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

if __name__ == "__main__":
    resolve()

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

Solution (Python):
listt = input().split()

doubutsu = int(listt[0])
ashi = int(listt[1])

kame = (ashi-2*doubutsu)/2
tsuru = doubutsu - kame

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

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

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

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

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

Solution (Python):


















































global FLAG_LOG
FLAG_LOG = False


def log(value):
    
    FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    
    
    X, Y = list(map(int, lines[0].split()))
    
    
    
    
    
    
    
    

    result = 'Yes'
    if Y >= X*2 and Y <= X*4 and Y % 2 == 0:
        result = 'Yes'
    else:
        result = 'No'

    return [result]



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['3 8']
        lines_export = ['Yes']
    if pattern == 2:
        lines_input = ['2 100']
        lines_export = ['No']
    if pattern == 3:
        lines_input = ['1 2']
        lines_export = ['Yes']
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    
    
    
    



if __name__ == '__main__':
    main()

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

flag = 0
for t in range(X + 1):
	for f in range(X + 1):
		if (2 * t + 4 * f == Y) and (t + f == X):
			flag = 1

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

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

f = False
for i in range(X + 1):
    n = 2 * i + 4 * (X - i)
    if n == Y:
        f = True
        break

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

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

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

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

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

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

Solution (Python):
def inN():
    return int(input())
def inL():
    return list(map(int,input().split()))

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

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

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

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

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

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

Solution (Python):
def solution():
    user_input = input()
    animals, legs = [int(x) for x in user_input.split()]

    turtles = (4*animals - legs) / 2
    condition = turtles >= 0 and turtles <= animals and turtles % 1 == 0 
    if condition:
        print("Yes")
    else:
        print("No")

solution()

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

if not ( 1 <= X <= 100 and 1 <= Y <= 100 ): sys.exit()

for I in range(101):
    for J in range(101):
        if (I*2 + J*4) == Y and I+J == X:
            print('Yes')
            sys.exit()
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"

print(ans)

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

c = 0

for i in range(100):
    for j in range(100):
        if i + j == x and i * 2 + j * 4 == y:
            c = 1
            break
if c:
    print("Yes")
else:
    print('No')

Solution (Python):


from typing import *
import itertools
import math
import sys

INF = float('inf')
YES = "Yes"  
NO = "No"  


def solve(X: int, Y: int):
    return [YES, NO][not (2*X <= Y <= 4*X and Y % 2 == 0)]


def main():

    sys.setrecursionlimit(10 ** 6)

    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))  
    print(solve(X, Y))


if __name__ == '__main__':
    main()

Solution (Python):


from typing import *
import itertools
import math
import sys

INF = float('inf')
YES = "Yes"  
NO = "No"  


def solve(X: int, Y: int):
    return [NO, YES][2*X <= Y <= 4*X and Y % 2 == 0]


def main():

    sys.setrecursionlimit(10 ** 6)

    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))  
    print(solve(X, Y))


if __name__ == '__main__':
    main()