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.



Sample input:
3 8


Sample output:
Yes

Submission status: Accepted

Solution code:
import sys
si = sys.stdin.readline


def main():
    l = [int(e) for e in si().split()]
    found = False
    for i in range(l[0]+1):
        legs = i*2+(l[0]-i)*4
        if l[1] == legs:
            print("Yes")
            found = True
            break
    if not found:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

for a in range(0, 101):
    for b in range(0, 101):
        if a+b == X and 2*a + 4*b == Y and (a > 0 or b > 0):
            print("Yes")
            sys.exit()

print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X, Y = map(int,input().split())
for k in range(X+1):
    for l in range(X+1):
        if 2*k + 4*l == Y and k+l == X:
            print("Yes")
            exit(0)
print("No")

Submission status: Accepted

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

ans = 'No'
if 2 * x <= y <= 4 * x and y % 2 == 0:
    ans = 'Yes'

print(ans)

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

 
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

x, y = MI()
if y % 2 == 1:
    print("No")
    sys.exit()
y = y // 2
if y > x * 2 or y < x:
    print("No")
    sys.exit()
print("Yes")

Submission status: Accepted

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

flag = False
for a in range(0, X+1):
    leg = 2 * a + 4 * (X-a)
    if leg == Y:
        print('Yes')
        flag = True

if not flag:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
Crane, Turtle = 2, 4
for x in range(X+1):
    if Crane*x + Turtle*(X-x) == Y:
        print("Yes")
        exit()
    if Crane*x + Turtle*(X-x) < Y:
        break
print("No")

Submission status: Accepted

Solution code:
import sys
X, Y = [int(x) for x in input().split()]

for i in range(X):
  x2 = i
  x4 = X - i
  if ((int(x2*2+x4*4) == Y) or (int(x2*4+x4*2) == Y)):
    print('Yes')
    sys.exit()

print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
ans = 'No'

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

Submission status: Accepted

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


def myfunc(X, Y):
    for tsuru in range(X+1):
        turtle = X - tsuru
        legs = turtle * 4 + tsuru * 2

        if legs == Y:
            return "Yes"

    return "No"

print(myfunc(X,Y))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X, Y = (int(x) for x in input().split())
if (4 * X - Y) / 2 >= 0 and (-2 * X + Y) / 2 >= 0 and (4 * X - Y) % 2 == 0 and (-2 * X + Y) % 2 == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

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

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

print('No')

Submission status: Accepted

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

if y % 2 is not 0:
	print("No")
	exit()

b = y / 2 - x

print("Yes" if b <= x and b >= 0 else "No")

Submission status: Accepted

Solution code:
import sys
X,Y = list(map(int, input().split()))
for a in range(X+1):
    b=X-a
    if a*2+b*4==Y:
        print('Yes')
        # print(a,b)
        sys.exit()
print('No')

Submission status: Accepted

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

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

print('No')

Submission status: Accepted

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

b = (Y - 2 * X) / 2

if b >= 0 and b.is_integer() and X >= b:

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

Submission status: Accepted

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

result = False
for a in range(x+1):
    b = x - a
#    print("a:{} b:{} =>{}".format(a,b,a*2+4*b))
    if (a*2 + 4*b) == y:
        result = True

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

Submission status: Accepted

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

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

print('No')

Submission status: Accepted

Solution code:
X, Y = map(int,input().split())
A = 2*X - Y/2.
B = Y/2. - X
#print(A,B)
if A.is_integer() and B.is_integer() and A>=0 and B>=0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    x,y = map(int, input().split())
    a="No"
    if y%2 == 1:
        a="No"
    #elif x == 1:
     #   if y==4 or y==2:
           # a="Yes"
    else:
        for i in range(1,x+1):
            j = x-i
            if 2*i+4*j==y or 4*i+2*j==y:
                a="Yes"
    print(a)
main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
from math import floor
def Main(X, Y):
    a = (Y-2*X)/2
    b = (4*X-Y)/2
    
    if a < 0 or b < 0:
        return "No"
    elif (a > 0 and floor(a) == a) or (b > 0 and floor(b) == b):
        return "Yes"
    else:
        return "No"
        
    
res = Main(X, Y)
print(res)

Submission status: Accepted

Solution code:
import sys

def input():
    return sys.stdin.readline().strip()

def main():
    x, y= map(int, input().split())
    if y % 2 == 1 or 4*x < y or y < 2*x:
        print("No")
        return
    print("Yes")



main()

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
count=0
for i in range(a):
    s1 = 2*i + 4*(a-i)
    s2 = 2*(a-i) + 4*i
    if s1 == b or s2 == b:
        count+=1
if count>0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

crane = 0

flg = False

while X - crane >= 0:
    if 2*crane + 4*(X - crane) == Y:
        flg = True
        break
    crane += 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x, y = [int(s) for s in input().split(" ")]
yy = y - 2 * x
xx = 4 * x - y

if yy < 0 or xx < 0 or yy % 2 != 0 or xx % 2 != 0:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

q, mod = divmod(Y, 2)

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

Submission status: Accepted

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

i=0
flag = 0
while(i <= x):
    if(i*2 + (x-i)*4) == y:
        flag = 1
        break
    i+=1
if flag == 1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
x, y = map(int, input().split())
t = (4*x-y)/2
k = (y-2*x)/2
a = t.is_integer()
b = k.is_integer()
if a == True and b == True and t >= 0 and k >= 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

if x*4+1 <= y or x*2-1 >= y:
    print('No')
elif y % 2 == 1:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
if Y % 2 == 1:
    print("No")
else:
    k = Y/2
    q = Y/4
    if q <= X and X <= k:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
from sys import stdin,setrecursionlimit
import heapq,bisect,math,itertools,string,queue,datetime,copy
setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, stdin.readline().split()))

x,y = inpl()

xx = (4*x-y)
yy = (y-2*x)

if xx >=0 and yy>=0 and xx%2==0 and yy%2==0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
A = (4*X - Y)/2
B = X - A
if 0 <= A <= X and 0 <= B <= X:
  if A%1 == 0:
    print('Yes')
    exit()
print('No')

Submission status: Accepted

Solution code:
X,Y = map(int, input().split())
P = "No"

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

c = Y / 2 - X
t = X - c


if (c < 0 or t < 0 or c != math.floor(c) or t != math.floor(t)):
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import time
#from collections import deque, Counter, defaultdict
#from fractions import gcd
#import bisect
#import heapq
import math
start=time.time()
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
inf = 10**18
MOD = 1000000007
ri = lambda : int(input())
rs = lambda : input().strip()
rl = lambda : list(map(int, input().split()))
x,y = rl()
for i in range(x+1):
    if i*2+(x-i)*4==y:
        print("Yes")
        sys.exit()
print("No")

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
a = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
  X, Y = map(int, input().split())
  if Y%2 != 0:
    return "No"

  x = -X + Y/2
  y = 2 * X - Y/2

  if x < 0 or y < 0:
    return "No"
  else:
    return "Yes"

print(main())

Submission status: Accepted

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

ans = Y - 2 * X
temp1 = ans / 2
temp2 = ans % 2

if ans >= 0 and temp2 == 0 and temp1 <= X:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

kame_num = x
turu_num = x - kame_num

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
exist_flg = False
for kame in range(a+1):
  tsuru = a - kame
  if (kame*4+tsuru*2)==b:
    exist_flg = True
    break
if exist_flg:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
#N = int(input())
#N = int(input())
#S = input()
# = input().split()
# = input().split()
# = map(int,input().split())
X,Y = map(int,input().split())
# = list(map(int,input().split()))
# = list(map(int,input()).split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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



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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
flag = True
for x in range(X+1):
    i = X - x # 亀　4
    j = x # 鶴　2
    if i*4+j*2 == Y:
        flag = False
        print("Yes")
        break
if flag:
    print("No")

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
result = False
for turtleI in range(51):
    if turtleI > x:
        break
    if (turtleI * 2 + (x - turtleI) * 4 == y):
        result = True
        break
if result:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys


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


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

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

    print("No")




if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
#! -*- coding: utf-8 -*-

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

r_min = x * 2
r_max = x * 4

flg = False
if r_min <= y <= r_max and y % 2 == 0:
    flg = True

print('Yes' if flg else 'No')

Submission status: Accepted

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

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

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

Submission status: Accepted

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

for a in range(101):
    for b in range(101):
        t = a + b
        l = 2*a + 4*b
        
        if t == x and l == y:
            print("Yes")
            exit()
            
print("No")

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
t = (4*X - Y) / 2
k = X - (4*X - Y) / 2

if t.is_integer() and k.is_integer() and t >= 0 and k >= 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
X,Y=map(int, raw_input().split())
for t in range(X+1):
    k=X-t
    if t*2+k*4==Y:
        pass
        print "Yes"
        quit()
else:
    print "No"

Submission status: Accepted

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

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

Submission status: Accepted

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

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

if pnt == 0:
    print("No")
if pnt == 1:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
x,y = map(int, sys.stdin.readline().rstrip("\n").split())
if 2*x <= y and y <= 4*x and y % 2 == 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

ans = 'No'

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

Submission status: Accepted

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

for i in range(0, x+1):
    j = x-i
    if i*2 + j*4 == y:
        flg = True
        break

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

Submission status: Accepted

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

Submission status: Accepted

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

kame = 0
turu = 0
kame = X
while True:
    if (kame * 4 + turu * 2 == Y):
        print('Yes')
        exit()

    if (kame == 0 or turu == X):
        break

    kame -= 1
    turu += 1


print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 初期入力
import sys
input = sys.stdin.readline
X,Y = (int(i) for i in input().split())
ans ="No"
for i in range(101):
    for j in range(101):
        if i+j ==X and i*4 + j*2 ==Y:
            ans ="Yes"

print(ans)

Submission status: Accepted

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

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

print(get_result())

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

for x in range(0,51):
    for y in range(0,51):
        if x + y == X and x * 2 + y * 4 == Y:
            print("Yes")
            exit()

print("No")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
flag = False
for i in range(X+1):
    for j in range(X+1):
        if i + j != X:
            continue
        if i*2 + j*4 == Y:
            flag = True
if flag:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

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

c = 0
for k in range(x + 1):
    if y == 4 * x - 2 * k:
        c = 1
        break

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

Submission status: Accepted

Solution code:
animal, legs = map(int, input().split())

for crane in range(animal + 1):
    turtle = animal - crane
    current_legs = 4 * turtle + 2 * crane
    if current_legs == legs:
        print("Yes")
        exit()
print("No")

Submission status: Accepted

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

Submission status: Accepted

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

ymin=2*X
ymax=4*X

if Y%2==0:
    if ymin<=Y<=ymax:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
X,Y=map(int,input().split())
l=[]
for i in range(X+1):
    l.append(2*i+4*(X-i))
if Y in l:
    print("Yes")
else:
    print("No")