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

crane = (4 * X - Y) / 2


def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False


if is_integer_num(crane) and crane > 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

total_min = 2 * animal
total_max = 4 * animal

is_yes = False
if total_min <= foot <= total_max:
    for a in range(animal):
        total = (a + 1) * 2 + (animal - (a + 1)) * 4
        print (total)
        if total == foot:
            print("Yes")
            is_yes = True
            break
        elif total < foot:
            break
    if is_yes == False:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

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

turu = (4 * X - Y) / 2

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

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10000000)

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

if y == 0 or x ==0 :print('No');exit()
if y%2 :print('No');exit()
if (y//2==x and y%2 ==0 ) : print('Yes');exit()
if (y//4==x and y%4 ==0 ) : print('Yes');exit()


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

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

print('No')

Submission status: Wrong Answer

Solution code:
def animal(x,y):
    if x==0 or y==0:
        return("No")
    if x==1 and y==2:
        return("Yes")
    if x==1 and y==4:
        return("Yes")
    for i in range(101):
        for j in range(101):
            if i*2+j*4==y and i+j<=x:
                return("Yes")
    return("No")


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

if x * 2 != y or x * 4 != y:

    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')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
num = (y - (2 * x))/ 2
num_2 = int(num)
print(num)
print(num_2)
if (4 * x) > y and num_2 -num == 0:
    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):
    print('No')
    return
  if (nl / 4.0) > nb:
    print('No')
    return
  for i in range(1, nb):
    if (nl % (i * 4)) % 2 == 0:
      print('Yes')
  print('No')

if __name__ == '__main__':
  main()

Submission status: Wrong Answer

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

m=4*x
yf=y//4

ans='Yes'

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

print(ans)

Submission status: Wrong Answer

Solution code:
import sys

def solve(n, m):
  for i in range(n):
    if (4*i + 2*(n-i)) == m:
      return i;

  return -1;


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

#print(X)
#print(Y)

r = solve(X, Y)
if r > 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,l=map(int,input().split())
x=(l-(2*a))//2
if a*4<l:
    print("No")
elif (4*x)+(2*(a-x))==l:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
a = y-2*x
b = a/2

if(a==y):
    print("Yes")

elif(x==0 and y==0):
    print("Yes")

else:
    print("NO")

Submission status: Wrong Answer

Solution code:
import sys
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

ans = "No"
flag = False
x , y = map(int, read().split())

for i in range(x+1):
  for j in range(x+1):
    tmp = i*4 + j*2
    if tmp is y:
      flag = True
      ans = "Yes"
      break
    elif tmp > y:
      flag = True
      break
  if flag is True:
    break


print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np

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

A = np.matrix([
    [1, 1],
    [2, 4]
])

N = np.matrix([
    [X],
    [Y]
])

if np.linalg.solve(A, N) is None:
  print("No")
elif int(np.linalg.solve(A, N)[0,0]) <0 and int(np.linalg.solve(A, N)[1,0]) <0:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
def main():
    sum, leg = map(int, input().split())
    
    if leg // sum == 2 and leg % sum == 0:
        print('Yes')
        return
    elif leg / sum == 4 and leg % sum == 0:
        print('Yes')
        return

    for i in range(sum):
        if i == 0:
            i = i + 1
        for x in range(sum - i):
            crane = i * 2
            turtle = x * 4
            total = crane + turtle
            if total == leg:
                print('Yes')
                return
    print('No')
    
main()

Submission status: Wrong Answer

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

turu = (4* X - Y)/2

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

Submission status: Wrong Answer

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 or y>0):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
kame = 4
turu = 2

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

if X * turu <= Y <= X * kame:
    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()

min=X*2
max=X*4
if min <= Y and Y <= max:
  print('yes')
  exit()
print('no')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input(). split ())
if not a % 2 == 0 and not b % 2 == 0:
    print('NO')
elif 2 * a <= b <= 4 * a:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
import sys
X, Y = map(int, input().split())
if X*4 < Y:
  print('No')
  sys.exit(0)
diff = Y - X*2
quo, remain = divmod(diff, 2)
if remain == 0:
  if quo > X:
    print('No')
  else:
    print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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 <= y)
print('Yes' if ret else 'No')

Submission status: Wrong Answer

Solution code:
x,y = map(float, input().split())
t = (y-2*x)/2
c = x-t
if(t>=0 and c>=0):
   print('Yes')
else:
   print('No')

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())
isOK = False
kame = 0
turu = int(Y/2)
if turu == X:
  isOK = True
for i in range(turu+X):
  if (turu+kame) == X:
    isOK = True
    break
  if turu != X:
    kame = kame + 1
    turu = turu - 2
if Y%2 == 1:
  isOK=False
if isOK == True:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(x+1):
    for k in range(x+1):
        if i * 2 + k * 4 == y:
            ans += 1
if ans >= 1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(X) :
    if Y -(4*i) == (X-i)*2 :
        print("Yes")
        exit()
    else :
        if Y%(2*X) == 0 or Y%(4*X) == 0 :
            print("Yes")
            exit()
print("No")

Submission status: Wrong Answer

Solution code:
A = list(map(int, input().split()))
x=A[0]
y=A[1]
i=(y-2*x)/2

if i.is_integer():
  if 2*x-y/2>0:
    print("Yes")
  
  else:
    print("No")
else:
  print("No")

Submission status: Wrong Answer

Solution code:

i = list(map(int, input().split()))
if ((i[1]/2)-i[0] >= 0) and i[0]*4-i[1] >= 0 :
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

#2z + 4(X-z) = Y
#-2z = Y - 4X
z = 2*X - 0.5*Y

if(0 < z and 1 <= (2*z + 4*(X-z)) and (2*z + 4*(X-z)) <= 100 and z.is_integer()):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

x,y = map(int,input().split())
if x*4 < y:
    print('No')
    sys.exit()
elif y%2 == 1:
    print('No')
    sys.exit()

for i in range(1, x+1):
    # 足の数
    f = 2 * i + 4 * (x - i)
    if f == y:
        print('Yes')
        sys.exit()
print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
X,Y = map(int, input().split())
kame = 4
turu = 2
all_turu = turu * X
change = kame - turu
remaining = Y - all_turu
kame_num = remaining // change
turu_num = X - kame_num
if (kame_num * turu_num) < 0:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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


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

  print('no')

Submission status: Wrong Answer

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

array = []
for i in range(X):
    legs = (2*(i+1))+(4*(X-(i+1)))
    array.append(legs)

for j in range(0, len(array)):
    if array[j] == Y:
        print('Yes')
        break
    else:
        print('No')
        break

Submission status: Wrong Answer

Solution code:
def nums (X,Y):
   B = (X*4-Y)/(4-2)
   D = X-B
   if B + D == X and Y == (B*2 + D*4):
          print("True")
   else:
           print("False")

Submission status: Wrong Answer

Solution code:
a = input().split(" ")
i = 0
l = int(a[0])
s = int(a[1])
while i < l :
    if s - 4 >= 0 :
        s = s - 4
    if (s - 2 >= 0) and (s - 4 <= 0) :
        s = s - 2
    if s == 0 :
        print("Yes")
        break
    i = i + 1
if s != 0 :
    print("No")

Submission status: Wrong Answer

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

def hoge(x, y):
    cnt = 0
    tmp = y
    while cnt < x:
        tmp -= 2
        cnt += 1
    if tmp - 2 == 0 or tmp - 4 == 0:
        return True

def fuga(x,y):
    cnt = 0
    tmp = y
    while cnt < x:
        tmp -= 4
        cnt += 1
    if tmp - 2 == 0 or tmp - 4 == 0:
        return True

is_true = False
if hoge(x,y):
    is_true = True
elif fuga(x,y):
    is_true = True
elif y % 4 == 0 and y / 4 == x:
    is_true = True
elif y % 2 == 0 and y / 2 == x:
    is_true = True

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

Submission status: Wrong Answer

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

turu = (4* X - Y)/2

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
a=x
while(x!=0):
    x=x-1
    y=y-2
if(y//2<=a):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10000000)

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

if y == 0 or x ==0 :print('No');exit()
if y%2 :print('No');exit()
if (y//2==x and y%2 ==0 ) : print('Yes');exit()
if (y//4==x and y%4 ==0 ) : print('Yes');exit()


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

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

print('No')

Submission status: Wrong Answer

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

if (Y/X %2) %4 :
    print("Yes")
elif X == 1 and Y == 2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

def check(x, y):
    # 動物の可能性を考える
    for i in range(0, x):
        # 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: Wrong Answer

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

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

Submission status: Wrong Answer

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 (1<=a<=100 and 1<=y<=100)
print('Yes' if ret else 'No')

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
if X*4 < Y:
  print('No')
diff = Y - X*2
quo, remain = divmod(diff, 2)
if remain == 0:
  if quo > X:
    print('No')
  else:
    print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

def get_CT(x,y):
  C=(4*x-y)/2
  T=x-C
  if C<=0 or T<=0:
    return 'No'
  else:
    return 'Yes'
print(get_CT(X,Y))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a = input().split(" ")
i = 0
l = int(a[0])
s = int(a[1])
while i < l :
    if s - 4 >= 0 :
        s = s - 4
    if (s - 2 >= 0) and (s - 4 <= 0) :
        s = s - 2
    i = i + 1
if s == 0 :
    print("Yes")
if s != 0 :
    print("No")

Submission status: Wrong Answer

Solution code:
def animal(x,y):
    if x==1 and y==2:
        return("Yes")
    if x==1 and y==4:
        return("Yes")
    for i in range(101):
        for j in range(101):
            if i*2+j*4==y and i+j<=x:
                return("Yes")
    return("No")


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

Submission status: Wrong Answer

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

a = (4*X-Y)/2
b = X - a
d = a.is_integer()
e = b.is_integer()
if a==0 and b==0:
    print('No')
elif a>0 and b>=0:
    if d and e:
        print('yes')
    else:
        print('No')
elif a>=0 and b>0:
    if d and e:
        print('yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if (t >= 2) & (t % 2 == 0) & (u >= 2) & (u % 2 == 0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:

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

if y % 2 == 0:

    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')
else:
    print('No')

Submission status: Wrong Answer

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

mm = l*4

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

if m == 0 or l == 0:
  print("No")
elif b<0:
  print("No")
elif a == 0:
  if b + (l-b) == l:
    print("Yes")
  else:
    print("No")
else:
    print("No")

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()
R = Y / X
if R == 2 or R==4:
  print('yes')
  exit()

min=X*2
max=X*4
if min <= Y and Y <= max:
  print('yes')
  exit()
print('no')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n, m = map(int,input().split())
if m <= 2**n:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
c = input()
c = c.split(' ')
x = int(c[0])
y = int(c[1])
sa = 4 * x -y
if sa % 2 == 0 and x*2 <= y:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

for a in range(50):
    for b in range(50):
        x = a + b
        y = 2 * a + 4 * b
        if x == X and y == Y:
            ans = "Yes"

print(ans)

Submission status: Wrong Answer

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

b=abs(y-2*x)

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

Submission status: Wrong Answer

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

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

if turu.is_integer() and turu > 0:
    if kame.is_integer() and kame > 0:
        print("Yes")
else:
    print("No")
    
#print(turu, kame)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
if X*4 < Y:
  print('No')
diff = Y - X*2
quo, remain = divmod(diff, 2)
if remain == 0 and quo <= X:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a, b = list(map(int,input().split()))
z= 0
if b% 2!=0:
    print("No")
else:
    while a>=0: 
        c = a*2+z*4
        if c ==b:
            print("Yes")
            quit()
        a-=1
        z+=1
print("No")

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

if t ==2 or t ==4 or t ==6:
  a=1

for i in range(b):
  for y in range(b-i):
    if (i*2) + (y*4) == t:
      a=1
      
if a == 1:
  print("Yes")
elif a == 0:
  print("No")

Submission status: Wrong Answer

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

flg = False
for i in range(1, 101):
    for j in range(1, 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: Wrong Answer

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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")
elif x*2 < y:
    x *= 2
    k = 2
    while x < y:
        x += k
        if x == y:
            print("Yes")
            exit()
        k += 2
    print("No")

Submission status: Wrong Answer

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

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

if turu.is_integer() and turu > 0:
    if kame.is_integer() and kame > 0:
        print("Yes")
else:
    print("No")
    
print(turu, kame)

Submission status: Wrong Answer

Solution code:
def main():
    sum, leg = map(int, input().split())
    
    if leg // sum == 2 and leg % sum == 0:
        print('Yes')
        return
    elif leg / sum == 4 and leg % sum == 0:
        print('Yes')
        return

    for i in range(sum):
        for x in range(sum - i):
            crane = i * 2
            turtle = x * 4
            total = crane + turtle
            if total == leg:
                print('Yes')
                return
    print('No')
    
main()

Submission status: Wrong Answer

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

for a in range(50):
    for b in range(50):
        x = a + b
        y = 2 * a + 4 * b
        if x == X and y == Y:
            ans = "Yes"
            break
    else:
        continue
    break

print(ans)

Submission status: Wrong Answer

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

def check(x, y):
    # 動物の可能性を考える
    for i in range(0, x):
        # 2本足,4本足の動物の数
        leg2_animal = i+1
        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: Wrong Answer

Solution code:

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

if y % 2 == 0:

    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')
        print ('Yoo')
    
    
    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')
else:
    print('No')

Submission status: Wrong Answer

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

Solution code:
num = input().split()
x = int(num[0])
y = int(num[1])
cr = ((4 * x) - y) / 2
tur = (y - (2 * x)) / 2
if cr - int(cr) == 0 and tur - int(tur) == 0 and tur > 0 and cr > 0:
    if cr + tur == x and (2 * cr) + (4 * tur) == y:
        print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

def get_CT(x,y):
  C=(4*x-y)/2
  T=x-C
  if C>0 and T>0:
    return 'Yes'
  if C==0 and T>0:
    return 'Yes'
  if T==0 and C>0:
    return 'Yes'
  return 'No'
  
print(get_CT(X,Y))

Submission status: Wrong Answer

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

for i in range(X) :
    if Y -(4*i) == (X-i)*2 :
        print("Yes")
        exit()
    else :
        if Y//2 or Y//4 :
            print("Yes")
            exit()
print("No")

Submission status: Wrong Answer

Solution code:
c=2
t=4
a=[]
val=0
v=0
flag=0
x,y = map(int, input().split())

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

if y in a:
    flag=1

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if x*2 >= y or x*4 >= y:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
XY = list(map(int, input().split()))
 
c = 2 * XY[0] - XY[1] / 2
t = - XY[0] + XY[1] / 2
 
if not (XY[1] / 2).is_integer:
  print('No')
elif c == 0 and t == 0:
  print('No')
elif c >= 0 and t >= 0:
  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("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def animal(x,y):
    if x==1 and y==2:
        return("YES")
    if x==1 and y==4:
        return("YES")
    for i in range(101):
        for j in range(101):
            if i*2+j*4==y and i+j<=x:
                return("Yes")
    return("NO")


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

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10000000)

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

if y == 0 or x ==0 :print('No');exit()
if y%2 :print('No');exit()
if (y//2==x and y%2 ==0 ) : print('Yes');exit()
if (y//4==x and y%4 ==0 ) : print('Yes');exit()

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

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

print('No')

Submission status: Wrong Answer

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

if t ==2 or t ==4:
  a=1

for i in range(b):
  for y in range(b-i):
    if (i*2) + (y*4) == t:
      a=1
      
if a == 1:
  print("Yes")
elif a == 0:
  print("No")

Submission status: Wrong Answer

Solution code:
N, M = map(int,input().split())


for i in range(1, N+1,1):
    # 足の数
    f = 2 * i + 4 * (N - i)
    if f == M:
        print('Yes')
        break
    elif N == M:
        print('No')
        break
    elif N >= M:
        print('No')
        break
    elif N > 100 or M > 100:
        print('No')
        break
else:
    print('No')

Submission status: Wrong Answer

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