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: Wrong Answer

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: Wrong Answer

Solution code:
X,Y=map(int,input().split())
count=0
for x1 in range(X+1):
    for x2 in range(X+1):
        if (x1*2)+(x2*4)==Y: count+=1
if count!=0: print("Yes")
else: print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

if (a+b) == X and (2*a+4*b) == Y:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N, M = map(int,input().split())
crain = (4 * N - M) / 2
if crain.is_integer() and crain >= 0:
  if N - int(crain) > 0:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Wrong Answer

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

tsuru = 1
kame = 1
flag = False

for tsuru in range(50):
    for kame in range(20):
        if tsuru + kame == x:
            if (tsuru*2 + kame*4) == y:
                flag = True
                break
    else:
        continue
    break


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x, y = list(map(int,input().split()))
ans = y / 2 - x 
if x == y or x >= y:
    print("No")
elif ans <= x:
    print("Yes")
elif ans >= x:
    print("No")

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())

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

if x+y == a and 2*x+4*y == b:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

INF = 10**20
def main():
    X,Y = map(int,input().split())

    k = (Y-2*X)//2
    t = X-k

    if t == 0:
        print("Yes" if k>0 else "No")
        exit()

    if k == 0:
        print("Yes" if t>0 else "No")
        exit()

    if k < 0 or t < 0:
        print("No")
        exit()

    if k > 0 and t > 0:
        print("Yes")
        exit()

    print("No")



if __name__ == "__main__":
  main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if X*4 < Y or X*2 > Y or Y % 2 != 0:
  print('no')
  exit()

T = Y/2 - X
C = X - T

if T+C==X:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
num, ans  = map(int, input().split())

def init():
    if (num*4 < ans):
        return False
    return True

def fin():
    if (ans == 2 or ans == 4):
        return True
    return False

def check():
    for i in range(num):
        kame = num - i
        total = 0
        for j in range(num):
            tsuru = num - j
            # print(kame, tsuru)
            total = kame*4 + tsuru*2
            if (total == ans):
                return True
            elif (total > ans):
                continue
            else:
                pass
    return False

if __name__ == '__main__':
    if (init()):
        if (fin()):
            print("Yes")
        elif (check()):
            print("Yes")
        else:
            print("No")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())

c = b//4
if c>a:
    print("No")
    exit()
for i in range(0, b):
    for j in range(0, b):
        if i*2 + j*4 ==b:
            print("Yes")
            exit()
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
x, y = list(map(int,input().split()))
ans = y / 2 - x 
if x == y:
    print("No")
elif ans <= x:
    print("Yes")
elif ans >= x:
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())

turu = 2
kame = 4
flag =0

for x in range(a):
    for y in range(a + 1):
        if kame * x + turu * y == b and x + y <= a:
            flag = flag + 1

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
XY = list(map(int, input().split()))
X = XY[0]
Y = XY[1]
Z = Y - 2*X

for i in range(1,51):
  if Z == 2 * i:
    print('Yes')
    break

  elif (i==50) and (Z != 2*i):
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
c = 0
for m in range(1,a+1,1):
  for n in range(1,a+1,1):
    if m+n*2==b/2:
      c = c+1
if c>=1:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys

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

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

if X == 1:
    if Y == 4 or Y == 2:
        print("Yes")
        sys.exit()

if Y < X:
    print("No")
    sys.exit()

print("No")

Submission status: Wrong Answer

Solution code:
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


x,y = list(map(int,input().split()))
if x == 0 and y == 0:
    print('Yes')
    exit()
a = prime_factorize(y)
if y % 2 == 0 and y <= 4*x:
    if a.count(2) != 0:
        a = [n for n in a if n != 2]
    # if a.count(4) != 0:
    #     a = [n for n in a if n != 4]
print('Yes' if len(a) == 0 else 'No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(0,x+1) :
    if i*4 == y or i*2 == y or i*4+i*2 == y :
        print("Yes")
        count+=1
        sys.exit()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

A = Y / X / 6

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())

turu = 2
kame = 4
flag =0

for x in range(a + 1):
    for y in range(a + 1):
        if kame * x + turu * y == b and x + y <= a:
            flag = flag + 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
if a==1 and b==2 or b ==4:
    print("Yes")
elif a==2 and b== 4 or b==6:
    print("Yes")
elif a==3 and b==8:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

A = int((Y / X) / 6)

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())

turu = 2
kame = 4
flag =0

for x in range(a + 1):
    for y in range(a + 1):
        if kame * x + turu * y == b and x + y <= a:
            flag = flag + 1

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

Submission status: Wrong Answer

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

for k in range(x):
    kame = k
    turu = x-k
    ashi = 2*turu + 4*kame
    if ashi==y:
        count += 1
        break

if count>0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
# 全ツル
if 2*X == Y:
  print('Yes')
# 全カメ
elif 4*X == Y:
  print('Yes')
# ツルカメ
elif (4*X - Y)%2 == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

INF = 10**20
def main():
    X,Y = map(int,input().split())

    k = (Y-2*X)//2
    t = X-k

    if k < 0 or t < 0:
        print("No")
    elif k == 0 and t == 0:
        print("No")
    elif (k == 0 and t>0) or (t == 0 and k>0):
        print("Yes")
    else:
        print("Yes" if 0<k and 0<t else "No")



if __name__ == "__main__":
  main()

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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

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

if (a+b) == X:
    pass 
    if (2*a+4*b) == Y:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
import sys

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

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


print("No")

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())

turu = 2
kame = 4
flag =0

for x in range(a + 1):
    for y in range(a + 1):
        if kame * x + turu * y == b and x + y <= a:
            flag = flag + 1

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

Submission status: Wrong Answer

Solution code:
N, M = map(int,input().split())
crain = (4 * N - M) / 2
if crain.is_integer() and crain >= 0:
  if N - int(crain) > 0:
    	print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
if a==1 and b==2 or b ==4:
    print("Yes")
elif a==2 and b== 4:
    print("Yes")
elif a==3 and b==8:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
X,Y = map(int, input().split())
ans = 0
for i in range(X):
    cranes = i
    turtles = X - cranes
  
    if cranes*2+turtles*4 == Y:
        ans += 1
        break

if ans >= 1:
    print("Yes")
elif X == 0 and Y == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())

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

if y > a :
    print("No")
elif y < 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if int((Y / X) / 6) == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
count = 0
if y%2 == 0:
    while y >= 2:
        if y > 2:
            if y%4 == 0:
                y = y/4
                count += 1
            elif y%2 == 0:
                y = y/2
                count += 1
            elif y%4 != 0 or y%2 != 0:
                count = 0
                break
        elif y == 2:
            count += 1
            break
else:
    print("No")

if count < x-2 or count > x or count == 0:
    print("No")
if count == x-1 or count == x:
    print("Yes")

Submission status: Wrong Answer

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

b = (y - (2*x))/2
a = abs(x - b)
if int(a) + int(b) == x:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
X,Y = (int(x) for x in input().split())
flag = False
for i in range(X):
    if X*4 <= Y:
        break
    if X*2 <= Y:
        Y -= X*2
        if Y%4 == 0:
            flag = True
            break
    else:
        pass
    X -= 1
if flag:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

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

for i in range(0,x+1) :
    if i*4 == y or i*2 == y or i*4+i*2 == y :
        print("Yes")
        count+=1
        break;

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

Submission status: Wrong Answer

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

  for i in range(1, 100):
    turu = i * 2
    for j in range(1, 100):
      kame = j * 4
      if turu + kame == y and i + j == x:
        print('Yes')
        return
  print('No')
  
if __name__ == "__main__":
  main()

Submission status: Wrong Answer

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

if Y % 2 != 0:
    print('No')
elif X >= Y:
    print('No')
elif Y/4 >= X:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

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

if (a+b) == X:
    pass 
    if (2*a+4*b) == Y:
        print('Ye')
else:
    print('No')

Submission status: Wrong Answer

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

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

if a.is_integer() and a>0:
    q=1
    print("Yes")

a=(8*X-Y)/4

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

Submission status: Wrong Answer

Solution code:
import sys

n , total = map(int,input().split())
t = 0
k = 0

for t in range(n + 1):
    for k in range(n):
        x = t + k
        if x == n:
            if 2*t + 4*k == total:
                print("Yes")
                sys.exit()
print("No")

Submission status: Wrong Answer

Solution code:
x, y = list(map(int,input().split()))
ans = y / 2 - x 
if ans >= x:
    print("No")
elif ans <= x or ans == x:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a,b=map(int, input().split()) 


for i in range(a):
    if (a-i)*2+(i)*4 == b:
        print('Yes')
        break
    if i == a:
        print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
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")
if x==1:
    if x*2==y or x*4==y:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())

turu = 2
kame = 4
flag =0

for x in range(a + 1):
    for y in range(a + 1):
        if kame * x + turu * y == b and x + y < a:
            flag +=1
# print(flag)

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

Submission status: Wrong Answer

Solution code:
a,b = [int(i) for i in input().split()]
ans='No'
if b%2==0 and (b%a == 2 or b%a == 4 or b%a==0) and b>a and b<=4*a: ans='Yes'
print(ans)

Submission status: Wrong Answer

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

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

if (a+b) == X:
    pass 
    if (2*a+4*b) == Y:
        print('Yes')
else:
    print('N')

Submission status: Wrong Answer

Solution code:
import sys

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

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

if X == 1:
    if Y == 4 or Y == 2:
        print("Yes")
        sys.exit()

print("No")

Submission status: Wrong Answer

Solution code:
num=[]
num=input().split(" ")
atama=int(num[0])
ashi=int(num[1])

count=0
for i in range(atama+1):
    if 2*(atama-i)+4*i == ashi:
        print("YES")
        break
    else:
        count=count+1
    
    if count == atama+1:
        print("No")

Submission status: Wrong Answer

Solution code:
a,b=map(int, input().split())

if (b-2*a)%2==0:
    if (b-2*a)<0:
      print('NO')
    elif (2*a-b)<0:
      print('NO')
    elif(2*a-b)%2==0:
      print('YES')
    else:
      print('No')
    
else:
  print('No')

Submission status: Wrong Answer

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

for k in range(101):
    kame = k
    turu = x-k
    ashi = 2*turu + 4*kame
    if ashi==y:
        count += 1
        break

if count>0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

if (a+b) == X:
    pass 
    if (2*a + 4*b) == Y:
        print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import os

def main():
  args = list(map(int, input().split()))
  nb = args[0]
  nl = args[1]
  if nb == 0 or (nl % 2 == 1) or nl == 0 or nb > nl or (nl / 4.0) > nb:
    print('No')
    return
  for i in range(1, nb + 1):
    if ((nb - i) * 4 + i * 2) == nl:
      print('Yes')
      return
  print('No')

if __name__ == '__main__':
  main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,k=map(int,input().split())
while k%2==0:
    k//=2
if k==0 or k==1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())

turu = 2
kame = 4
flag =0

for x in range(a + 1):
    for y in range(a + 1):
        if kame * x + turu * y == b and x + y <= a:
            flag +=1

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

Submission status: Wrong Answer

Solution code:
z=[]
a=[]
b=[]
x, y= map(int,input().split())
for i in range(x):
    a.append(i)


for i in a:
    b.append(i+1)


for i in b:
    if (2*i)+(4*(x-i))==y:
        z.append('1')
    
        
if len(z)>0:
    print('YES')

if len(z)<=0:
    print('NO')

Submission status: Wrong Answer

Solution code:
from sys import stdin,stdout
import math
from collections import deque,defaultdict
from math import ceil,floor,inf,sqrt,factorial,gcd,log2
from copy import deepcopy
ii1=lambda:int(stdin.readline().strip())
is1=lambda:stdin.readline().strip()
iia=lambda:list(map(int,stdin.readline().strip().split()))
isa=lambda:stdin.readline().strip().split()
mod=1000000007
ani,total = iia()
if ani==1:
    print('No')
elif total>ani*4:
    print('No')
elif total % 2==0:
    ans=(4*ani - total)
    if ans%2==0:
        if 1<=ans//2<ani:
            print('Yes')
        else:
            print("No")
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x, y = map(int,input().split())
z=-2
if x %2 == 0:
    for i in range(x):
        if i % 2 == 0:
            z +=4
        else:
            z +=2
    if z == y :
            print("Yes")
    elif z!=y :
            print("No")
elif x%2 != 0:
    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")

Submission status: Wrong Answer

Solution code:
num=[]
num=input().split(" ")
atama=int(num[0])
ashi=int(num[1])

count=0
for i in range(atama):
    if 2*(atama-i)+4*i == ashi:
        print("YES")
        break
    else:
        count=count+1
    
    if count == atama:
        print("No")

Submission status: Wrong Answer

Solution code:
i = list(map(int, input().split()))
if i[1]%2 == 1:
  print('No')
  exit()

x = 1/2*(i[1]-2*i[0])
print(x)

if 0 <= x < i[0] and x.is_integer():
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

if y%2 == 1:
    print('No')
elif 4 * x < y:
    print('No')
elif 2 * x > 7:
    print('No')
else:
    for i in range(1,y):
        if 2 * i + 4 * (x-i) == y:
            print('Yes')
            break
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())

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

if y >= a :
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
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")
if x==1:
    if x*2==y or x*4==y:
        print("Yes")

Submission status: Wrong Answer

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

crane = (x*4 - y)//2
turtles = x - crane

if crane + turtles != x or crane < 0 or turtles < 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


x,y = list(map(int,input().split()))
a = prime_factorize(y)
if a.count(2) != 0:
    a = [n for n in a if n != 2]
if a.count(4) != 0:
    a = [n for n in a if n != 4]
print('Yes' if len(a) == 0 else 'No')

Submission status: Wrong Answer

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

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

turu = (4* X - Y)/2

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())

turu = 2
kame = 4

flag =0
for x in range(a + 1):
    for y in range(a + 1):
        if turu * x + kame * y == b and x + y <= a-1:
            flag +=1

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

Submission status: Wrong Answer

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

X,Y = map(int,input().split())
if Y % 2 !=0:
    a = "NO"
else:
    t = 2*X-Y/2
    k = Y/2-X
    if int(t)<0 or X<int(t):
        a = "No"
    else:
        a = "Yes"
print(a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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 :
        print("Yes")
    elif z==(y-2):
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

if X*4 < Y or X*2 > Y or Y % 2 != 0:
  print('no')
  exit()

T = Y/2 - X
if T.is_integer():
  if T*4+(X-T)*2==Y:
    print('yes')
    exit()
print('no')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
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:
    ans = X * 4
    count = ans/4
    if count == X and Y%4 == 0:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
n = [int(i) for i in input().split()]
if n[0]*4 < n[1] or n[1]%2 == 1 or n[1] < n[0] or n[0] == n[1]:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

if x%2!=0 and y%2==0:
	print("Yes")
else:
	print("NO")

Submission status: Wrong Answer

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

crane = (x*4 - y)//2
turtles = x - crane

if crane + turtles != x or crane < 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
# 全ツル
if 2*X == Y:
  print('Yes')
# 全カメ
elif 4*X == Y:
  print('Yes')
# ツルカメ
elif (4*X - Y)//2:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:

import math


X,Y=map(int, input().split())
if math.isclose(-Y//2+2*X, math.ceil(-Y//2+2*X)) and math.isclose(Y//2-X, math.ceil(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")

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())

turu = 2
kame = 4

flag =0
for x in range(a + 1):
    for y in range(a + 1):
        if turu * x + kame * y == b and x + y < a:
            flag +=1

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

Submission status: Wrong Answer

Solution code:
N, M = map(int,input().split())
if M % 2 == 1 or N * 4 < M:
    print("No")
    exit() 


crain = (4 * N - M) / 2
if crain.is_integer() and crain > 0:
    crain = int(crain)
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
l=[]
for i in range(x):
  l.append(2*(x+i))
  i+=1
print('Yes' if y in l else 'No')

Submission status: Wrong Answer

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

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

if (a+b) == X:
    pass 
if (2*a+4*b) == Y:
        print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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