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:
x,y=map(int,input().split())
if y%2==0:
    print('NYoe s'[2*x<=y<=4*x::2])
else:
    print('No')

Submission status: Accepted

Solution code:
a = input().split()
b = int(a[0])
c = int(a[1])

X = 2
Y = 4
for i in range(b+1):
    if b == 1 and c == 2:
        print('Yes')
        break
    elif b == 1 and c == 4:
        print('Yes')
        break
    d = b-i
    if X*i + Y*d == c:
        print('Yes')
        break
    elif i == b:
        print('No')

Submission status: Accepted

Solution code:

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

if x * 2 == y or x * 4 == y:
    print ('Yes')
elif (x / 2 * 2 + x / 2 * 4) == y and y % 2 == 0:
    print ('Yes')
else:

    c = x
    v = y

    while x > 0:
        if y - 4 != 0:
            y -= 2
            x-= 1
        else:
            y -= 4
            x -=1


    if x == y == 0:
        print ('Yes')


    else:
        while c > 0:
            if v - 2 != 0:
                v -= 4
                c-= 1
            else:
                v -= 2
                c -=1

        if c == v == 0:
            print('Yes')
        else:
            print ('No')

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
# a: 総数hiki， b: 足の数
a, b = map(int, input().split())

# かめiひき
for i in range(a+1):
  total = 4*i + 2*(a-i)
  if total == b:
    ans = 'Yes'
    break
  else:
    ans = 'No'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
if a[1] % 2 == 1 :
  print("No")
else :
  if a[0] * 2 <= a[1] and a[0]*4 >= a[1] :
    print("Yes")
  else :
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def c(x,y):
  i=0
  
  while i!=x:
    if (4*i)+(2*(x-i))==y:
      print("Yes")
      return
    
    elif (2*i)+(4*(x-i))==y:
      print("Yes")
      return
    i +=1
  
  print("No")
  return

n=list(map(int,input().split()))
c(n[0],n[1])

Submission status: Accepted

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

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

Submission status: Accepted

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

print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    x,y=map(int,input().split())
    for n in range(x+1):
        m=x-n
        if 2*n+4*m==y:
            print("Yes")
            sys.exit()
    print("No")

if __name__=='__main__':
    main()

Submission status: Accepted

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

han = 0

for t in range(0,x+1):
  if t * 2 + (x - t) * 4 == y:
    han += 1
    
    
if han != 0:
  print("Yes")

else:
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print("No")

Submission status: Accepted

Solution code:
x, y = [int(x) for x in input().split()]
a = b = 0
flag = False
for i in range(x + 1 // 2):
    a = x - i
    b = x - a
    if 4 * a + 2 * b == y or 4 * b + 2 * a == y:
        flag = True
        break
print("Yes" if flag else "No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
x, y = map(int, input().split())
ans = "No"
for turu in range(x + 1):
    kame = x - turu
    ashi = 2 * turu + 4 * kame
    if y == ashi:
        ans = "Yes"
        break
print(ans)

Submission status: Accepted

Solution code:
a,b = map(int,input(). split ())
if not b % 2 == 0:
    print('No')
elif a > 100:
    print('No')
elif b > 100:
    print('No')
elif a < 1:
    print('No')
elif b < 1:
    print('No')
elif not isinstance(a, int):
    print('No')
elif not isinstance(b, int):
    print('No')
elif 2 * a <= b <= 4 * a:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

t = (Y - 2 * X) // 2
c = (4 * X - Y) // 2

if c < 0 or t < 0:
    print('No')
else:
    if c+t == X:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

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

b = (y-2*x)/2
a = (4*x-y)/2
if b >= 0 and a >= 0 and b.is_integer() == True and a.is_integer() == True:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

turu = (4*x-y)//2
# print(turu)

if (turu < 0) or (2*x > y):
    print("No")
    exit()

if ((y-turu*2) % 4 == 0):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def readInt():
    return list(map(int,input().split()))
    
x,y = readInt()
crain = (4*x-y)/2
turtle = (y-2*x)/2
if crain.is_integer() and turtle.is_integer and crain >= 0 and turtle >= 0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
a = 0
for i in list(range(0, 51)):
    for m in list(range(0, 26)):
        if i * 2 + m * 4 == y and i + m == x:
            a += 1
if 50 < x:
    a = 0
if a == 1:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin
input = stdin.readline

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

else:
    print("No")

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor, gcd
from operator import mul
from functools import reduce
from operator import mul
import pprint



sys.setrecursionlimit(2147483647)
INF = 100
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007


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

Submission status: Accepted

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

b=y-2*x


if b==0:
  print('Yes')
elif b<0:
  print('No')
elif b%2!=0:
  print('No')
  
elif x >=b/2:
  
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
from sys import stdin, stdout
import sys
INF=1e9
def get_int(): return int(stdin.readline().strip())
def get_ints(): return map(int,stdin.readline().strip().split()) 
def get_array(): return list(map(int,stdin.readline().strip().split()))
def get_string(): return stdin.readline().strip()
def op(c): return stdout.write(c)
#from collections import defaultdict 
#for _ in range(int(stdin.readline())):
x,y=get_ints()
if y%2==0:
    if y>=2*x and y<=4*x:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

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

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

print("No")

Submission status: Accepted

Solution code:
import sys

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

for i in range(100):
  for j in range(100):
    if 2 * i + j * 4 == y and i + j == x:
      print('Yes')
      sys.exit()
      
print('No')

Submission status: Accepted

Solution code:
import math

def a():
    x = list(map(int, input().split()))
    print(x.index(0) + 1)


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



def c():
    print('')



def d():
    print('')


b()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
x,y=map(int,input().split())
if(y%2!=0):
    print("No")
    exit()
q=y-(2*x)
if q%2 or q<0:
    print("No")
    exit()
q=q//2
r=x-q
if r<0:
    print("No")
    exit()
print("Yes")

Submission status: Accepted

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

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

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

if turu >= 0 and kame >= 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = list(map(int, input().split()))
x=A[0]
y=A[1]
i=(y-2*x)/2
j=2*x-y/2
if i.is_integer() and j>=0 and  j.is_integer() and i>=0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
num = list(map(int,input().split()))
if num[0]*2<=num[1]<=num[0]*4 and num[1]%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')
        exit(0)


print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
"""
2 * a + 4 * 2 * (X - a) = Y
2a + 8X - 8a = Y
8X - 6a = Y


2 * turu + 4 * kame = Y
turu + kame = X
turu = X - kame

2(X - kame) + 4kame = Y
2X - 2kame + 4kame = Y
2X + 2kame = Y
2kame = Y - 2X
kame = (Y - 2X) / 2
"""


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

a = (Y - 2 * X) / 2

if a >= 0 and X >= a and a == int(a):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
#if (2*x)<y:
z=y-(2*x) #12本足りない z=12
a=z/2 #a=6 亀に変身する鶴の数

if a<=x and a>=0 and z%2==0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import numpy as np
x, y = map(int, input().split())

a = np.array([[2, 4], [1, 1]])
b = np.array([y, x])
c, d = np.linalg.solve(a, b)
c = int(c)
d = int(d)

if c + d == x and c >= 0 and d >= 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

def f(x,y):
	if y%2==1:
		return 'No'
	for i in range(2*x, 4*x+1):
		if i==y:
			return 'Yes'
	return 'No'


print(f(x,y))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x, y = map(int,input().split())
kame = (y - 2*x) / 2
tsuru = x - kame
if kame.is_integer() and tsuru.is_integer():
  if kame > 0 and tsuru >= 0:
    print('Yes')
  elif tsuru > 0 and kame >= 0:
    print('Yes')
  else:
    print('No')
  exit()
else:
  print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import math
def get_array(): return list(map(int,sys.stdin.readline().strip().split()))
def get_ints(): return map(int,sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
x,y=get_ints()
flag=0
if y%2!=0:
    flag=0
else:
    a=y//2 
    b=a-x
    a=x-b
    if a<0 or b<0:
        flag=0 
    else:
        flag=1 
if flag==1:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
if Y % 2 == 1:
  print("No")
  exit()

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



if a >= 0 and isinstance(a, int) and b >= 0 and isinstance(b, int):
  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:
i = list(map(int, input().split()))


if ((i[1]/2)-i[0] >= 0) and i[0]*4-i[1] >= 0 and i[1]%2 == 0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

if x * 4 >= y and x * 2 <= y:
    print('Yes')
    exit()

print('No')

Submission status: Accepted

Solution code:
from sys import stdin

#l = list(map(int, stdin.readline().rstrip().split()))
x,y = map(int, stdin.readline().rstrip().split())
#S = [list(map(int, stdin.readline().rstrip().split())) for _ in range(h)]#hの定義を忘れずに

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

Submission status: Accepted

Solution code:
import sys
from math import sqrt, gcd, ceil, log
from bisect import bisect
from collections import defaultdict
inp = sys.stdin.readline
read = lambda: list(map(int, inp().strip().split()))

# sys.setrecursionlimit(10**6)



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





if __name__ == "__main__":
	solve()

Submission status: Accepted

Solution code:
from sys import stdin,stdout
x,y=map(int,stdin.readline().split())
if y&1:
    print('No')
    exit(0)
t=(y//2)-x
c=x-t
ans='Yes' if c>=0 and t>=0 else 'No'
print(ans)

Submission status: Accepted

Solution code:
import sys
import itertools
# import numpy as np
import time
import math
 
sys.setrecursionlimit(10 ** 7)
 
from collections import defaultdict
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
def main():
    x, y = map(int, input().split())
    a = (4*x-y)
    b = (y-2*x)

    am = 50
    bm = 25

    out = 'No'

    for a in range(0, am+1):
        for b in range(0, bm+1):
            Y = 2*a + 4*b
            X = a + b
            if X==x and Y==y:
                out = 'Yes'
    
    print(out)

main()

Submission status: Accepted

Solution code:
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

tin=lambda : map(int, input().split())
lin=lambda : list(tin())
mod=1000000007

#+++++

def main():
	#a = int(input())
	x, y = tin()
	#s = input()
	for i in range(x+1):
		t=i
		k=x-i
		ashi=t*2 + k*4
		if ashi == y:
			return 'Yes'
	return 'No'
	
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
if (a[0] * 4) >= a[1] and (a[0] * 2) <= a[1] and a[1] % 2 == 0:
    print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

ans = []

for i in range(0,X+1):
    ans += [[i, X-i]]

f = 0
for i in range(len(ans)):
    if 2*ans[i][0] + 4*ans[i][1] == Y :
        print('Yes')
        f = 1
        exit()
    else:
        continue

if f == 0:
    print('No')

Submission status: Accepted

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

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

ret = (int(a) == a and int(b) == b) and (0<= a and 0 <= b)
print('Yes' if ret else 'No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
if x*4 < y:
    print("No")
elif x*2 == y:
    print("Yes")
elif x*4 == y:
    print("Yes")
else:
    x *= 2
    while x < y:
        x += 2
        if x == y:
            print("Yes")
            exit()
    print("No")

Submission status: Accepted

Solution code:
def main():

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

        return ans


if __name__=="__main__":
        ans = main()
        print(ans)

Submission status: Accepted

Solution code:
from numpy.linalg import solve

X,Y = input().split(" ")

left = [[2, 4],
        [1, 1]]
 
right = [int(Y), int(X)]
 
Ans = solve(left, right)

#print(Ans)

# 数値が整数（小数点以下が0）か、0より大きいか判定
if Ans[0].is_integer() == True and Ans[1].is_integer() == True and Ans[0] >= 0 and Ans[1] >= 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

min, max = 0, 0
kq, kmod = divmod(y, 4)
tq, tmod = divmod(kmod, 2)
if tmod != 0:
        print('No')
        exit()
else:
        min = kq + tq

t2q, t2mod = divmod(y, 2)
if t2mod != 0:
        print('No')
        exit()
else:
        max = t2q

if x <= max and x >= min:
        print('Yes')
else:
        print('No')
        exit()

Submission status: Accepted

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

x = (legs - 2*n)/2
y = (4*n - legs)/2

if x%1==0 and y%1==0 and (x>=0 and y>=0):
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

# process
result = False
for i in range(0, Y//4+1):
    if Y == 2*(X-i) + 4*i:
        result = True
        break

# output
print("Yes" if result else "No")

Submission status: Accepted

Solution code:
X,Y=map(int,input().split())
for i in range(0,101):
  if (X-i)>=0 and i*2+(X-i)*4==Y:
    print('Yes')
    #print(1,i)
    exit()
  elif (X-i)>=0 and i*4+(X-i)*2==Y:
    print('Yes')
    #print(2,i)
    exit()
print('No')

Submission status: Accepted

Solution code:
int2=tuple(map(int,input().split()))
t=0
for a in range(0,int2[0]+1):
  for b in range(0,int2[0]+1):
    if a+b==int2[0] and 2*a+4*b==int2[1]:
      t+=1
      break
if t==0:
  print("No")
else:
  print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

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

else:
    result_list = []    
    
    for a in range(X+1):
        result_list.append(2 * a + 4 * (X - a) == Y)
    
    if any(result_list):
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
import sys
x, y = [int(i) for i in input().split()]
z = [0]*2

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

for i in range(1, x+1):
  z[0] += 2
  z[1] += 4

if y >= z[0] and y <= z[1]:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

ans = 0

#つるをi

for i in range(Y):
  for j in range(Y):
      if 2*i + 4*j == Y and i + j == X:
          ans +=1
        
    
if ans > 0:
  print('Yes') 
else:
  print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

x, y = map(int, input().split())
y -= (x * 2)

if(y % 2 == 1):
  print('No')
  sys.exit()

if(y == 0):
  print('Yes')
  sys.exit()

for i in range(x):
  y -= 2
  if(y == 0):
    print('Yes')
    sys.exit()

print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if b%2==1:
    print('No')
elif b>4*a:
    print('No')
elif 2*a>b:
    print('No')
else:
    print('Yes')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

ans = ((4 * X) - Y) % 2

if ans == 0 and test >= 0 and test <= X:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

def check(x, y):
    # 動物の可能性を考える
    for i in range(0, x+1):
        # 2本足,4本足の動物の数
        leg2_animal = i
        leg4_animal = x - leg2_animal
        
        # 全体の足の数を数えてみる
        sum_legs = leg2_animal * 2 + leg4_animal * 4

        if sum_legs == y:
            print("Yes")
            return

    print("No")

check(x,y)

Submission status: Accepted

Solution code:
s = input()
lst = s.split()

ex1 = int(lst[0])
ex2 = int(lst[1])
ret = "No"

for i in range(ex1+1):
    if 4 * (ex1 - i) + 2 * i == ex2:
        ret= "Yes"

print(ret)

Submission status: Accepted

Solution code:
S = input().split()
X = int(S[0])
Y = int(S[1])
max = X*4
min = X*2

if Y % 2 == 0 and min <= Y and Y <= max:
	print("Yes")
else:
	print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

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

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
a,b=x*2-y//2,y//2-x
print('YNeos'[y%2 or a<0 or b<0::2])

Submission status: Accepted

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

for a in range(x + 1):
    tem = 2 * a + 4 * (x - a)
    if (tem == y):
        #  and (2 * x <= y <= 4 * x):
        print('Yes')
        exit()

print('No')

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
if y % 2 != 0:
    print("No")
elif y % 2 == 0:
    s  = "A"
    for i in range(0,101):
        for j in range(0,101):
            if 2*i + 4*j == y and i + j == x:
                print("Yes")
                exit()
            else:
                s = "No"
    print(s)

Submission status: Accepted

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

if (t >= 0) & (t % 2 == 0) & (u >= 0) & (u % 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 (x-i)*2+i*4==y:
        print("Yes")
        exit()
print("No")