peterverebics/CodeNet_Python_118 huggingface dataset:
X,Y = map(int,input().split())

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

kame = X - turu

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

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

m=4*x
yf=y//4

ans='Yes'

if m<y:
    ans='No'
elif y%2!=0:
    ans='No'
elif y%2==0 or y%4==0:
    pass
elif yf+1<=x:
    pass
else:
    ans='No'

print(ans)
A,B=map(int,input().split())
if A-2*B >=1 and  (A-2*B)%2==0:
  print("Yes")
else:
  print("No")
X, Y = [int(v) for v in input().split()]

ans = "No"
for c in range(X + 1):
    t = X - c
    if 2 * c + 3 * t == Y:
        ans = "Yes"
        break
if ans == "No":
    for t in range(X + 1):
        c = X - t
        if 2 * c + 3 * t == Y:
            ans = "Yes"
            break

print(ans)
a, b = map(int, input().split())
c = 0
for i in range(a):
    if (i*2) + (a-i)*4 == b:
        c+=1
if c>0:
    print("Yes")
elif a==1 and ((b==2) or (b==4)):
    print("Yes")
else:
    print("No")
x,y=map(int,input().split())
if x*4>=y and y%2==0 and x*2<=y:print("是")
else:print("没有")
X, Y = map(int, input().split())

for turu in range(1, X + 1, 1):
    kame = X - turu
    legs = kame * 4 + turu * 2
    if legs == Y:
        print("Yes")
        break
else:
    print("No")
#!/usr/local/bin/python3
# coding: utf-8

ha = input()
kita = ha.split(" ")
x = int(kita[0])
y = int(kita[1])
ifAshi = False

for i in range(x):
    if((y - 2*i)%4 == 0):
        if((x-i) == ((y - 2*i)/4)):
            ifAshi = True

if(ifAshi):
    print("Yes")
else:
    print("No")
c=2
t=4
a=[]
val=0
v=0
flag=0
x,y = map(int, input().split())

for i in range(1,x+1):
    val=i*c
    v=i*t
    a.append(val)
    a.append(v)

if y in a:
    flag=1
if y==(x*c):
    flag=1
if y==(x*t):
    flag=1
    
if flag==1:
    print("Yes")
else:
    print("No")
X, Y = map(int, input().split())

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

if Y == X * 2 or Y == X * 4:
    print('Yes')
else:
    print('No')
num_input=input().split()   
x=int(num_input[0])
y=int(num_input[1])
ans="No"
if x*2<=y and y<=x*3:
    if y%2==0:
        ans="Yes"
print(ans)
X, Y = map(int, input().split(' '))
result = False
for i in range(1,X+1):
    if 2*i + 4*(X-i) == Y:
        result = True
        print('Yes')
if not(result):
    print('No')
a = input()
b = a.split(" ")
x, y = int(b[0]), int(b[1])
if x * 2 <= y <= x * 4:
    print("yes")
else:
    print("no")
x,y=map(int, input().split())


crain = (4 * x - y) / 2
if crain.is_integer() and crain > 0:
    crain = int(crain)
    print('Yes')
elif x == 1 and y ==4:
    print('Yes')
else:
    print('No')
x, y = map(int,input().split())
z =-2
for i in range(x):
    if i % 2 == 0:
        z +=4
    else:
        z +=2
if z == y or z == (y-2):
        print("Yes")
elif z!=y :
        print("No")
N, M = map(int,input().split())
for i in range(1, N+1):
    # 足の数
    f = 2 * i + 4 * (N - i)
    if f == M:
        print("Yes")
        break
else:
    print("No")
x,y=map(int,input().split())
if x>1:
    x=x-1
    f=x*2+(x-1)*4
    if f==y:
        print("Yes")
    else:
        print("No")
        exit()
if x==1:
    if x*2==y or x*4==y:
        print("Yes")
    else:
        print("No")
X,Y = map(int, input().split())
ans = 2*X-Y/2
if ans >= 0 and ans%1 == 0:
  print('Yes')
else:
  print('No')
a, b = map(int, input().split())

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

if y < 0 or x < 0:
    print("No")
else:
    print("Yes")
import sys

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

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

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

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

if ((y/2)-x).is_integer() :
  print("Yes")
else:
  print("No")
X, Y = map(int, input().split())

ans = 0

if Y/2 == X: ans = 1

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

if ans == 1: print('Yes')
else: print('No')
X, Y= map(int,input().split())

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

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

if X-a >= 0:
    print("Yes")
    exit()

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

k = (y-2*x) / 2
t = x - k
if 2*t + 4*k == y and k >= 0 and t >= 0:
    print('Yes')
else:
    print('No')
X,Y= map(int,input().split())
if (Y%2==0 and 2*X<=Y and Y<=4*X):
    print('yes')
else:
    print('No')
X,Y = map(int, input().split())
if Y%2==0 and Y<4*X:
    print("Yes")
else:
    print("No")
S,leg = [int(i) for i in input().split()]
#2x + 4(S-x) = leg
#2x + 4S - 4x - leg = 0
#2x = 4S-leg
x = (4*S-leg)/2
if x-int(x) == 0 and x>=0:
  print('Yes')
else:
  print('No')
X, Y = map(int, input().split())

x = (4*X - Y)/2
y = X - x

if x > 0 and x.is_integer():
  print("Yes")
elif x == 0 and y > 0 and y.is_integer():
  print("Yes")
else:
  print("No")
X, Y = map(int, input().split())
y =2*X-Y/2
if y.is_integer() and y >= 0:
     x = X - y
     s =4*x+2*y  
     if s == Y:
         print("Yes")
     else:
         print("No")
else:
    print("No")
def main():
    na, nl = (int(i) for i in input().split())
    nc = (4*na - nl) / 2

    pos = nc == int(nc) and nc >= 0 and nc <= na

    if pos:
        print('Yes')
    else:
        print('No')
X,Y = map(int,input().split())
asi = 2*X
for i in range(X):
    if asi == Y:
        print("Yes")
        exit()
    else:
        asi += 2
print("No")
total_num, reg_total = map(int, input().split())

if reg_total % 2 == 0 and reg_total <= total_num * 4:
    print('Yes')
else:
    print('No')
import sys
x,y = map(int,input().split())
for i in range(x+1):
  for j in range(x+1):
    if (i*2)+(j*4) == y:
      print("Yes")
      sys.exit()
print("No")
x,y = map(int, input().split(' '))
if y % 2 == 1:
    print('NO')
elif y//4 > x:
    print('NO')
else:
    print('YES')
a,b = map(int,input().split())

for i in range(a+1):
  if 2*(i+a) == b:
    print("Yes")
  else :
    print("No")
x,y=map(int,input().split())
if y-2*x<0:
  print('No')
elif 4*x-y<0:
  print('No')
else:
  print('Yes')
X, Y = map(int, input().split())
K = 0

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

print("No")
import sys

argv = input().split()

X = int(argv[0])
Y = int(argv[1])
success = 0

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

if success == 0:
  print ("no")
else:
  print ("yes")
x,y = map(int,input().split())

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

print(ans)
import numpy as np

x, y = map(int, input().split())
A = np.array([
        [1, 1],
        [2, 4]
    ])
b = np.array([x, y])
inv_A = np.linalg.inv(A)
solve = inv_A @ b
print("No" if solve[0] < 0 or solve[1] < 0 else "Yes")
import sys


def ip():
    return sys.stdin.readline()


def ipl():
    return sys.stdin.readline().split()


def solve():
    a, b = map(int, ipl())
    c = 2 * a - (b / 2)
    t = a - c
   # print(t >= 0, c >= 0, t + c, t + c == a)
    if t >= 0 and c >= 0 and t + c == a:
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    solve()
X,Y = input().split()
X = int(X)
Y = int(Y)
if 4*X < Y:
  print('No')
else:
  if Y % 2 != 0:
    print('No')
  else:
    print('Yes')
import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI():return list(map(int,sys.stdin.readline().rstrip().split()))
def LS():return list(sys.stdin.readline().rstrip().split())

def main():
  X,Y = LI()[:]
  #print(X,Y)

  if ((Y-2*X) % 2) == 0:
    a = (Y-2*X) / 2
    if a<=X:
      print('Yes')
      exit()
  
  print('No')

if __name__ == '__main__':
	main()
a = input().split(" ")
i = 0
l = int(a[0])
s = int(a[1])
while (i < l) and (l < s) :
    if s - 4 >= 0 :
        s = s - 4
    if (s - 2 >= 0) and (s - 4 <= 0) :
        s = s - 2
    if s == 0 :
        print("Yes")
        break
    i = i + 1
if (s != 0) and (l < s) :
    print("No")
if (s >= l) :
    print("No")
X,Y= map(int, input().split())
ans = "No"
for i in range(0,X):
    if Y == (2*i + 4*(X - i)):
        ans = "Yes"
print(ans)
from fractions import Fraction

a=input()
a=a.split()

X=int(a[0])
Y=int(a[1])

x=Fraction(4*X-Y,2)
y=Fraction(Y-2*X,2)

if x-round(x)==0:
  if y-round(y)==0:
    print("Yes")
else:
  print("No")
X, Y = map(int, input().split())

tf = False
if X == 1:
    if Y == 2 or Y == 4:
        tf = True
else:
    for i in range(1, X + 1):
        for j in range(X - i, 0, - 1):
            if i * 2 + j * 4 == Y:
                tf = True

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

if Y%2 ==1:
    print("No")
elif x>=0 and y>=0:
    print("Yes")
else:
    print("Yes")
x, y = map(int, input().split())
a = y // (2*x)
if x == 1 and y == 2:
    print ("Yes")
else:
    if a < x:
        print ("Yes")
    else:
        print ("No")
import math


X,Y=map(int, input().split())
if math.isclose(-Y//2+2*X, round(-Y//2+2*X)) and math.isclose(Y//2-X, round(Y//2-X)):
    if Y//2-X>0 and -Y//2+2*X>0:
        print("Yes")


    elif Y//2-X==0 and -Y//2+2*X>0:
         print("Yes")


    elif Y//2-X>0 and -Y//2+2*X==0:
         print("Yes")

    else:
         print("No")


else:
    print("No")
x,y = map(int,input().split())
f = 0
for i in range(x):
    asi = int(i * 4 + (x - i) * 2)
    if asi == y:
        f = 1
        break
if f == 1:
    print("Yes")
else:
    print("No")
X, Y = map(int, input().split())
Z = X * 4 - Y
print(Z)
if Z % 2 == 0 and Z >= 0:
    print("Yes")
else:
    print("No")
X, Y = map(int, input().split())

if X % 2 == 1 and Y % 2 == 1:
    print('No')
    exit()

v = -Y + 4 * X
# print('v', v)
if v % 2 != 0:
    print('No')
    exit()

if v < 0:
    print('No')
    exit()

if X < v:
    print('No')
    exit()

print('Yes')

# a: turu, b: kame
# a * 2 + b * 4 = Y
# a + b = X

# b = X - a
# a * 2 + (X - a) * 4 = Y
# 4 * X - 2 * a = Y を満たす a があるか
# a = (- Y + 4 * X) / 2
x, y = map(int, input().split())
for i in range(1, x+1):
    if 2*i + (x-i)*4 == y:
        print('Yes')
        break
else:
    print('No')
x, y = map(int, input().split())

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

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

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

for i in range(x):
    y -= 2

if y <= y*2 and y <= x*4:
    print('Yes')
else:
    print('No')
x,y=(int(x) for x in input().split())
if y>x*6:
    print('No')
elif y<x*2:
    print('No')
elif y%2==1:
    print('No')
else:
    print('Yes')
n, x  = [int(x) for x in input().strip().split(' ')]
ans = 'No'
for a in range(n+1):
  b = x - a
  if 2 * a + 4 * b == x:
    ans = 'Yes' 
print(ans)
x, y = tuple(map(int, input().split()))

a = y // 4
b = y % 4

c = b // 2
d = b % 2

if a + c <= x and d == 0:
    print('Yes')
else:
    print('No')
x, y = map(int, input().split())

a=b=0


if x*4<y or x*2>y:
    print('No')
    exit()

if (y-2*x)%2==0:
    n=(y-2*x)/2
    if x-b>=0:

        print('鶴',x-b)
        print('亀',n)

        print('Yes')
else:
    print('No')
#!/usr/bin/env python
"""AtCoder Beginner Contest 170: B - Crane and Turtle
https://atcoder.jp/contests/abc170/tasks/abc170_b
"""


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

    b = (Y - (2*X)) // 2
    a = X - b
    # print('a:{}, b:{}'.format(a, b))

    if a < 0 or b < 0:
        print('No')
    else:
        print('Yes')


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

if (4*x - y) >=0 and(4*x - y)//2 < x:
  print('Yes')
else:
  print('No')
X ,Y = map(int,input().split())
if X > 50:
    print('No')
    exit(0)

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

if Y % 2 == 1 and X > Y:
    print('No')
    
else:
    print('Yes')
N, M = map(int,input().split())
for i in range(1, N+1):
    f = 2 * i + 4 * (N - i)
    if f == M:
        print('Yes')
        break
else:
    print('No')
x, y = input().split()
crane = float(x)*2 - float(y)/2
if crane.is_integer() == True:
	if crane > 0:
		print('Yes')
	else:
		print('No')
else:
	print('No')
x, y = map(int, input().split())
print("Yes" if 2**x == y else "No")
x,y = list(map(int, input("").split()))

if 4 * x < y:
    print("No")
else:
    if 2 * x <y:
        if y % 2 == 0:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
x,y=map(int,input().split())
if (4*x-y)<0:
  print('No')
else:
  if (4*x-y)%2==0:
    print('Yes')
  else:
    print('No')
A_B = list(map(int, input().split()))
X = A_B[1] / 2 - A_B[0]
if X < 0:
    print("No")
elif (X - int(X)) < 0:
    print("No")
elif X > A_B[0]:
    print("No")
else:
    print("Yes")
X, Y = map(int, input().split())

if X != 1:
    for turu in range(1, X + 1, 1):
        kame = X - turu
        legs = kame * 4 + turu * 2
        if legs == Y:
            print("Yes")
            break
    else:
        print("No")
else:
    if Y == 2 or Y == 4:
        print("Yes")
    else:
        print("No")
x,y=map(int,input().split())
#x匹でy本
if y<2*x or 4*x<y:
  print("No")
else:
  print("Yes")
N, M = map(int,input().split())
crain = (4 * N - M) / 2
if crain.is_integer() and crain > 0:
    print("Yes")
else:
    print("No")
a,b = map(int,input().split())

vr_total = 4*a
diff = vr_total - b
turu = diff / 2
kame = a -turu

if turu>=0 and kame>=0:
  print("Yes")
else:
  print("No")
x, y = map(int, input().split())
flag = 0
for i in range(1,x+1):
    if 2*i + 4*(x-i) == y:
        flag = 1
        print('Yes')
        break
    else:
        continue
if flag == 0:
    print('No')
z=[]
x, y= map(int,input().split())
for i in range(x):
    if (4*i)+(2*(x-i))==y:
        z.append('1')
        

if len(z)>0:
    print('YES')

if len(z)<=0:
    print('NO')
x = list(map(lambda x:int(x), input().split()))
X = x[0]
Y = x[1]

kame = (Y-X*2)//2
#print(kame)

if X-kame >= 0 and Y - kame*4 == (X-kame)*2:
  print("Yes")
else:
  print("No")
# coding: utf-8
# Your code here!

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

if(y > x*4):
    print("no")
else:
    if(y%2 == 1):
        print("no")
    else:
        print("yes")
import sys

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

#鶴a匹、亀x-a匹とする
for a in range(1, x + 1):
  if y == 4 * x - 2 * a:
    print('Yes')
    sys.exit()
    
print('No')
X,Y = input().split(' ')
x = int(X)
y = int(Y)
if 2*x <= y <=4*x:
    print('Yes')

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")
n,k=map(int,input().split())
while k%2==0:
    k//=2
if k==0 or k==1:
    print("Yes")
else:
    print("No")
# -*- coding: utf-8 -*-

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict

x,y = map(int,input().split())
i=0
for _ in range(x):
    i= i+1
    f = 2 * i + 4 * (x - i)
    if f == y:
        print('Yes')
        sys.exit()
print('No')
#!/usr/bin/python
# -*- Coding: utf-8 -*-

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

c = 4 * x - y
t = y - 2 * x

if c % 2 == 0 and t % 2 == 0:
    if c < 0 or t < 0:
        print("No")
    else:
        print("Yes")
else:
    print("Yes")
l,m = map(int,input().split())
a = 0
b = 0

mm = l*4

a = (mm - m) % 2
b = (mm - m) // 2

if m == 0 or l == 0:
  print("No")
elif b<0:
  print("No")
elif a == 0:
  if b + (l-b) == l:
    print("Yes")
  else:
    print("No")
else:
    print("No")
x,y = map(int,input().split())
if((x * 2) <= y)and(y <= (x * 4)):
    if(y % 2 == 0):
        print("Yes")
    else:
        print("No")
x,y=map(int,input().split()) #input for x=animals, y=legs

c=2 #crane has 2 legs
t=4 #turtle has 4 legs

for i in range (x+1): #loop the number of animals

    a=x-i #the subtraction to get the number of turtle available for every loop starting from i=0

    if i*c +a*t==y: #the formula to get the amount of legs for both animals in a loop
        print ("yes") #if equals to y then there is a combination of both animals
    else:
        print("no")
X, Y = map(int, input().split())

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

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

if (4*X - Y) >= 0 and (Y - 2*X)>= 0:
    print("Yes")
else:
    print("No")
X,Y = map(int,input().split())
if 2*X == Y or 4*X == Y or Y%X == 2:
  print('Yes')
else:
  print('No')
x, y = list(map(int, input().split()))
end = False
for i in range(x+1):
    if 4*i + 2*(x-1) == y:
        print("Yes")
        end = True
        break
if end == False:
    print("No")
X, Y = map(int, input().split())
if(Y % 2 != 0):
    print("No")
else:
    if(Y <= X*4):
        print("Yes")
    else:
        print("No")
n=input()
x,y=n.split()
c=(4*int(x)-int(y))/2
t=int(x)-c
if c.is_integer is False or t.is_integer is False or 100<c or c<0 or (c==0 and t==0):
  print('No')
else:
  print('Yes')
x,y = map(int, input().split())
if y-2*x >= 0 and (y-2*x)%2 == 0 and (y-2*x)//2 < x:
  print("Yes")
else:
  print("No")
N, M = map(int,input().split())
crain = (4 * N - M) / 2
R = N - int(crain)
if crain.is_integer() or R >= 0:
    print("Yes")
else:
  print("No")
x, y = map(int, input().split())

ans_1 = x * 4 #12
ans_2 = ans_1 - y #4
# print(ans_2)
if ans_2 > 0 and ans_2 % 2 == 0:
    print("Yes")
else:
    print("No")
X, Y = map(int, input().split())
for c in range(26):
    t_leg = Y - 2 * c
    if t_leg % 4 == 0 and (t_leg // 4) + c == X:
        print("Yes")
        exit()
print("No")
x,y=map(int,input().split())

for i in range(x+1):
  for j in range(x+1-i):
    # if i==0 and j==0:continue
    if 2*i+4*j==y and 1<=y<=100:
      print("Yes")
      exit(0)
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())
x2=y//2-x
x1=x-x2
if(y==0 and x>0):
    print("No")
elif(x==0 and y>0):
    print("No")
elif(x1==0 and x2==0):
    print("No")
elif(x1>=0 and x2>=0):
    print("Yes")
else:
    print("No")
x, y = map(int, input().split())
for i in range(1, x+1):
  if 4*i + 2*(x - i) == y:
    print("Yes")
    exit()
print("No")
def main():
    sum, leg = map(int, input().split())
    
    if leg / sum == 2:
        print('Yes')
        return
    elif leg / sum == 4:
        print('Yes')
        return

    for i in range(sum + 1):
        for x in range(sum - i):
            crane = i * 2
            turtle = x * 4
            total = crane + turtle
            if total == leg:
                print('Yes')
                return
    print('No')
    
main()
X,Y = map(int,input().split())
lst = []

for i in range(X+1):
    lst.append(2*i + 4*(X-i))
    lst.append(2*(X-i) + 4*i)

try:
    if lst.index(Y):
        print('Yes')
except:
    print('No')
x,y=map(int,input().split())
if x==1 and x*4>=y and y%2==0:
  print('Yes')
elif x*4>= y and y%2==0:
    print('Yes')
else:
  print('No')
x,y=map(int,input().split()) #input for x=animals, y=legs

c=2 #crane has 2 legs
t=4 #turtle has 4 legs

for i in range (x+1): #loop the number of animals

    a=x-i #the subtraction to get the number of turtle available for every loop starting from i=0

    if (i*c) +(x*a)==y: #the formula to get the amount of legs for both animals in a loop
        print ("yes") #if equals to y then there is a combination of both animals
    else:
        print("no")
def turukame(x,y,a,b):
    kame_legs = max(a,b)
    turu_legs = min(a,b)
    delta = kame_legs - turu_legs

    turu_num = (y*kame_legs - x)//delta
    kame_num = y - turu_num

    return (turu_num,kame_num)

X,Y = input().split()
a,b= turukame(int(Y),int(X),2,4)
if a >=0 & b>=0:
    print('Yes')
else:
    print('No')
x,y=map(int,input().split())
t=2*y-4*x
c=y-t
if y<0 or x<0:
  print("No")
else:
  print("Yes")
X,Y=input().split();
X=int(X);
Y=int(Y);
K=(Y-2*X)/2;
if not K-int(K)==0:
  print('No');
  exit()
T=X-K;
if K>0 and T>0:
  print('Yes');
else:
  print('No');
X, Y = map(int,input().split())

for i in range(X) :
    if Y -(4*i) == (X-i)*2 :
        print("Yes")
        exit()
    else :
        if Y%(2*X) == 0 or Y%(4*X) == 0 :
            print("Yes")
            exit()
print("No")
import sys
x, y = map(int, input().split())

if ((x==1 and y==2) or (x==1 and y==4)):
    print('Yes')
    sys.exit()

b = (y - 2 * x) * 1.0 / 2
a = x - b
if b.is_integer() and 0 < b and 0 < a:
    print('Yes')
else:
    print('No')
#!python3

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

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

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

if __name__ == "__main__":
    resolve()
X,Y=input().split();
X=int(X);
Y=int(Y);
K=(Y-2*X)/2;
T=X-K;
if K>0 and T>0:
  print('Yes');
else:
  print('No');
def main():
    x , y = map(int,input().split())
    if (y//x)%2==0 and (y//x)<x*4:
        return "Yes"
    else:
        return "No"
print(main())
import sys
X, Y = list(map(int, sys.stdin.readline().rstrip().split(' ')))

y = (4*X-Y)/2
x = (Y-2*X)/2

if x > 0 and y > 0 and isinstance(x, int) and isinstance(y, int):
  print("Yes")
else:
  print("No")
x,y = map(int, input().split())


if 0 <= x <= 100 and 0 <= y <= 100:
  for a in range(0, 100, 1):
    if ( 2 * (x-a) + 4 * a == y and  a < x ):
      print('yes')
      exit()

  print('no')
x,y = list(map(int, input().split()))
tmp = y%2
count = 0
"""
while tmp == 0:
    y /= 2
    tmp = y%2
#    print(y)
    count += 1
print(count)
if y ==1 and count >= x:
    print("Yes")
else:
    print("No")
"""

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

print("No")
x,y=map(int,input().split())
if x!=0 and (y==(2*x)+4 or y==2*x or y==4*x or y==(4*x)+2 or y==(2*x)+2 or y==(4*x)+4 or y==(4*x)-2 or y==(4*x)-4):
    print("Yes")
else:
    print("No")
a,b =map(int,input().split())
c = 1
for i in range(a):
  if (b-2*a)%4==0:
    c = 0
    break
if c ==1:
  print("No")
else:
  print("Yes")
xs = list(map(int, input().split()))

turu = xs[0]
kame = 0
head = xs[0]

result = ""
for _ in range(head):
    if turu * 2 == xs[1]:
        result = "Yes"
        break
    else:
        kame += 1
        turu -= 1
        if kame * 4 + turu * 2 == xs[1]:
            result = "Yes"
            break
        else:
            result = "No"
            
print(result)
x,y=map(int,input().split())
a=x
while(x!=0):
    x=x-1
    y=y-2
if(y%2==0):
    if(y//2<=a):
        print("Yes")
    else:
        print("No")
else:
    print("No")
x,y = map(int,input().split())
a = 4 * x - y
if a/2 == a//2 and a > 0:
  print('Yes')
else:
  print('No')
def main():
    X, Y = map(int,input().split())

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

    return 'No'

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

if (y-2*x>=0) and (4*x-y>=0):
    print('Yes')

else:
    print('No')