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:
num, legs = map(int, input().split())

flag = 1
tmp = num * 4
for i in range(num+1):
    if(tmp == legs):
        print("Yes")
        flag = 0
    else:
        tmp -= 2
if(flag == 1):
    print("No")

Submission status: Wrong Answer

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

hoge = 4 * X - Y
result = 'No'

if hoge % 2 == 0:
    if hoge > 0:
        if hoge // 2 <= X:
            result = 'Yes'

print(result)

Submission status: Wrong Answer

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

while a>=0:
  if x-a<0:
    a-=1
    continue
  if 2*a+4*(x-a)==y:
    print('Yes')
    exit(0)
  a-=1
print('No')

Submission status: Wrong Answer

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

for i in range(X+1):
    for j in range(X+1):
        if i + j < X:
            pass
        else:
            if (((2*i) + (3*j)) == Y) or (((2*j) + (3*i)) == Y):
                print("Yes")
                sys.exit()
print("No")

Submission status: Wrong Answer

Solution code:
X, Y = map(int,input().split())
crain = (4 * X - Y) / 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())
var = y-2*x
if (var%2 == 0) and (x-var//2 >= 0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

answer= 'No'
for i in range(101):
  for j in range(101):
    if 2*(i+1)+ 4*(j+1) == y and i+j+2==x:
      answer= 'Yes'

print(answer)

Submission status: Wrong Answer

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

if Y>4*X:
    print('No')
else:
    pass

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

Submission status: Wrong Answer

Solution code:
# B - Crane and Turtle

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

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

if a>=0 and b>=0 and x%1!=0.5 and y%1!=0.5:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

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

# a + b = X
# 2a + 4b = Y
# --
# b = (Y-2X) / 2

b = (Y - 2 * X) / 2.0

if b.is_integer():
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
num_input=input().split()   
x=int(num_input[0])
y=int(num_input[1])
ans="No"
if x*2<=y and y<=x*3:
    if y%2==0:
        ans="Yes"
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

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

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

print('No')

Submission status: Wrong Answer

Solution code:
x, y = map(int,input().split(' '))
c = x * 2
le = y - c
t = le // 2
c = x - t
r = 'Yes'
if c < 0 or t < 0:
    r = 'No'
print(r)

Submission status: Wrong Answer

Solution code:
def CraneAndTurtle():

    CraneAndTurtle = list(map(int,input().split()))

    flag_num = float(float(CraneAndTurtle[1] - 2.*CraneAndTurtle[0])/2.) - int(float(CraneAndTurtle[1] - 2.*CraneAndTurtle[0])/2.)

    if flag_num == 0:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    CraneAndTurtle()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
X =a[0]
Y =a[1]
for n in range(X+1):
    for i in range(X+1):
        if 2*n+4*i ==Y and n +i <=X:
            print("Yes")
            break
    else:
        continue
    break
else:
    print("No")

Submission status: Wrong Answer

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

for i in range(x+1):
    for k in range(x-i+1):
        a=4*i+2*k

        if a==y:
            s+=1

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

Submission status: Wrong Answer

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

flag = 0

for x in range(1,X+1):
    if 4 * X - 2 * x == Y:
        flag = 1

if X == 1 and Y == 2:
    flag = 1
if X == 1 and Y == 4:
    flag = 1

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

Submission status: Wrong Answer

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

if c >= 1 and t >= 1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if  (y - x*2)%2 == 0:
    a = (y-x*2)//2
    b = x - a
    if a < 0 or b < 0:
        print("NO")
        exit(0)
    elif y == b * 2 + a * 4:
        print("YES")
    else:
        print("NO")
else:
    print("NO")

Submission status: Wrong Answer

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

ans_1 = x * 4 #12
ans_2 = ans_1 - y #4
# print(ans_2)
if ans_2 >= 0 and ans_2 % 2 == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
K = Y / 2 - X
T = 2 * X - Y / 2

if K.is_integer() and T.is_integer() and K * 4 + T * 2 == Y and K + T == X:
    print("Yes")
else:
    print('No')

Submission status: Wrong Answer

Solution code:
from numpy.linalg import solve
X,Y = map(int,(input().split()))
left = [[1, 1],[2, 4]]
 
right = [X, Y]

if(int(solve(left, right)[0])>0 and int(solve(left, right)[1])>0 and solve(left, right)[0].is_integer() and solve(left, right)[1].is_integer()):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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


"""
a + b = x
2a + 4b = y

a = x-b
2x- 2b + 4b = y

a = x-b
2b = y  - 2x
"""
def f(x,y):
  	
	if (y - 2*x) < 0: return False
	b = y - 2*x
	a = x - b
	if a < 0: return False
	return True
  
print 'Yes' if f(x,y) else 'No'

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a = y / 2 - x
b = x - a

c = 2 * x - y / 2
d = x - c

if c >= 0 or d >= 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

if m/4<=n<=m/2 and n%2==0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
X, Y = list(map(int, input().split()))
kame = 4
turu = 2

def flag():
    for i in range(X): #単調増加
        kame_num = i
        turu_num = X - i
        temp_sum = turu_num * turu + kame_num * kame
        if temp_sum == Y:
            return True
    return False

flag = flag()
print('Yes') if flag else print('No')

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
X=a[0]
Y=a[1]

crain = (4*X-Y)/2
turtle = (Y-2*X)/2

if crain.is_integer() and crain >= 0:
    if turtle.is_integer() and turtle >= 0:
        print("Yes")
    else:
        print("False")
else:
    print("False")

Submission status: Wrong Answer

Solution code:
import numpy as np

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

A = np.array([1, 1, 4, 2]).reshape(2, 2)
v = np.array([X, Y]).reshape(2, 1)

u = np.dot(np.linalg.inv(A),v)

if u[0] < 0 or u[1] < 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

m = y/2 - x
n = 2*x - y/2

if 0 <= m and 0 <= n:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

for a in range(x+1):
    legs = 2 * a + 4 * (x-a)
    if legs == y:
        print('YES')
        exit()
print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

(x, y) = map(int, sys.stdin.readline().strip().split())

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

b = -x + y/2
a = x - b

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

"""
a: 鶴の数、b: 亀の数
a + b = x -> 2a + 2b = 2x
2a + 4b = y

より
2b = -2x + y -> b = -x + 1/2y
"""

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
fin = ""
if (X * 4 < Y or Y % 3 == 0):
	fin += "No"
else:
	fin += "Yes"
print(fin)

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())
result = []
if Y % 2 == 0:
  while Y > 0:
    Y -= 2
    result.append(2)
  if len(result)//2<=X<=len(result):
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

turu = 2*x
came = 4*x

if y%2==0:
    if y >= turu and came >= y:
        print("YES")
    else:
        print("NO")
else:
    print("NO")

Submission status: Wrong Answer

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

flag = 0

for x in range(1,X+1):
    print(x)
    if 4 * X - 2 * x == Y:
        flag = 1

if X == 1 and Y == 2:
    flag = 1
if X == 1 and Y == 4:
    flag = 1

if flag == 1:
    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-i+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())

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

if (t >= 0) & (k >= 0):
    if (t == 0) & (k == 0):
        print('No') 
    else:
        print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x, y = map(int ,input().split())
# check for only cranes
if x * 2 == y or x * 4 == y:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys

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

for t in range(51):
    if Y - t*2 -(X-t)*4 == 0:
        print("yes")
        sys.exit()
print("no")

Submission status: Wrong Answer

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

if X == 1 and Y == 2 or Y == 4:
    ans = True
elif X == 100 and Y == 200:
    ans = True

for x in range(X):
    crane = x
    turtle = X - x
    if Y == 2*crane + 4*turtle:
        ans = True
        break

if ans == True:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
li = input().split()
num = int(li[0])
foot = int(li[1])
a = 0
for i in range(num+1):
  for j in range(num):
    n = 2*i + 4*j
    if n == foot:
      a += 1
      if a == 1:
        print("Yes")

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

Submission status: Wrong Answer

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

def check():
    for i in range(1,100):
        if i * 2 + (X - i) * 4 == Y:
            return 'Yes'
    return 'No'

print(check())

Submission status: Wrong Answer

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

a=X*2
b=X*4

if a<=Y<=b:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
turu = 4
kame = 2
flag = 'No'
for i in range(a):
  for j in range(a-i):
    if b == turu * i + kame * j:
      flag = 'Yes'

print(flag)

Submission status: Wrong Answer

Solution code:
# coding:utf-8


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

    m = (Y-2*X)

    if (m >= 0 and m % 2 == 0 and (2*X - m) >= 0 and (2*X - m) % 2 == 0):
        print("Yes")
    else:
        print("NO")

    return


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

x, y= na()


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

Submission status: Wrong Answer

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

for a in range(0, X):
	y = 4*a + 2*(X-a)
	if Y == y:
		print("Yes")
		exit()
print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
X,Y=input().split();
X=int(X);
Y=int(Y);
K=(Y-2*X)/2;
T=X-K;
if K>0 and T>0:
  print('Yes');
else:
  print('No');

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# 標準入力の取得
X, Y = list(map(int, input().split()))

# 求解処理
result = False
for crane in range(101):
    turtle = X - crane
    if 2*crane + 4*turtle == Y:
        result = True
        break

# 結果出力
if result:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

for i in range(101):
    for j in range(101):
        if i + j == X and 2 * i + 4 * j == Y:
            print("YES")
            exit()

print("NO")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
yes = "Yes"
no = "No"

ans = no
for i in range(x):
    s = (4 * i) + (2 * (x - i))
    if (y == s):
        ans = yes
        break

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

import sys

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

    if x >= y:
        print("No")
    else:
        for i in range(x+1):
            for j in range(x+1-i):
                if i*2+j*4==y:
                    print("Yes")
                    sys.exit()
                elif i*4+j*2==y:
                    print("Yes")
                    sys.exit()
        print("No")

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
a = list(map(int, input().split()))
X =a[0]
Y =a[1]
for n in range(X+1):
    for i in range(X+1):
        if 2*n+4*i ==Y and n +i <=X:
            print("YES")
            break
    else:
        continue
    break
else:
    print("NO")

Submission status: Wrong Answer

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

for i in range(2 ** X):
    bag = []
    food = 0
    for j in range(X):  # このループが一番のポイント
        if ((i >> j) & 1):  # 順に右にシフトさせ最下位bitのチェックを行う
            food +=2
        else:
            food+=4
    if food == Y:
        print('YES')
        sys.exit()
print("NO")

Submission status: Wrong Answer

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

if Y%2!=0:
    print('No')
    flg=True
else:
    for i in range(0,X+1):
        for j in range(X+1-i):
            if i*2+j*4 == Y or j*2+i*4 == Y:
                print("Yes")
                flg=True
                break
        if flg:
            break

if flg==False:
    print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

k = (y-2*x) / 2
t = x - k
if 2*t + 4*k == y and k >= 0 and t >= 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
def animal(x,y):
    if x*4 >= y:
        return "Yes"
    return "No"

if __name__ == "__main__":
    x,y = map(int,input().split())
    print(animal(x,y))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys

N, M = map(int, input().split())

for i in range(1, N+1):
    f = 2 * i + 4 * (N - i)
    if f == M:
        print('Yes')
        break
    elif f < M:
        print('No')
        break

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = "Yes"
if y % 2 != 0:
  ans ="No"
elif y//4 > x:
  ans = "No"
elif (y - (x * 2) ) / 2 > x :
  ans = "No"

print(ans)

Submission status: Wrong Answer

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

Z = Y - 2 * X

b = Z / 2
a = X - b

if (a > 0 and b > 0 and a % 1 == 0 and b % 1 == 0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

if Y % 2 == 0:
  y = Y/2 - S
  if y <= S:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
atama, asi = [int(x) for x in input().split()]
turu = 2
kame = 4

if atama <= asi//turu and asi%2 == 0:
    print("Yes")
else:
    print("No")

# 足の総数は常に偶数
# 鶴が多いほど、少ない足で頭数を揃えられる
# 亀が多いほど、頭数に対して足の数が必要

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# X:動物の総数　Y:足の総数
X, Y = map(int, input().split())
turu_a = X * 2
kame_a = X * 4
#turu_a <= Y and Y <= kame_a:
if (kame_a - turu_a) % 2 == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from numpy.linalg import solve
X, Y = map(int, input().split())

left=[[1,1],[2,4]]
right=[X,Y]

a=solve(left,right)

if a[0] >=0 and a[1] >= 0 and a[0].is_integer() and a[1].is_integer():
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def iput(): return int(input())
def mput(): return map(int, input().split())
def lput(): return list(map(int, input().split()))

def solve():
    x, y = mput()
    hoge = (x * 4 - y) / 2
    if hoge % 1 == 0 and hoge >= 0:
        if (x-hoge) % 1 == 0:
            print("Yes")
    else:
        print("No")
    return 0

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

if 4 * x < y:
    print("NO")
else:
    if y % 2 == 0:
        print("YES")
    else:
        print("NO")

Submission status: Wrong Answer

Solution code:
x,y = list(map(int,input().split()))
#print(x,y)
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 y >= x * 2 and y % 2 == 0 and y < x * 4:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

res = "No"
for i in range(51):
    for j in range(21):
        if (2 * i + 4 * j == y) and (i + j == x):
            res = "Yes"
            
print(res)

Submission status: Wrong Answer

Solution code:
import sys
import math
import collections
import decimal
import itertools
from collections import deque
from functools import reduce
import heapq
#n = int(input())
x, y = map(int, sys.stdin.readline().split())
#s = input()
#x = list(map(int, sys.stdin.readline().split()))
     

if 2 ** x > y:
    print("No")
    sys.exit()

if 4 ** x < y:
    print("No")
    sys.exit()

if y % 2 == 1:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

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

print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

for tsuru in range(a):
    for kame in range(a-tsuru):
        if(tsuru*2 + kame*4) == b:
            print("Yes")
            exit()

if a*2 == b:
    print("Yes")
    exit()
if a*4 == b:
    print("Yes")
    exit()
print("No")

Submission status: Wrong Answer

Solution code:
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce


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


def INT(): return int(input())


def MAP(): return map(int, input().split())


def LIST(): return list(map(int, input().split()))


def ZIP(n): return zip(*(MAP() for _ in range(n)))


sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
    X, Y = MAP()
    if (Y-2*X)%2 == 0 and (Y-2*X)/2 >= 0 and (3*X-Y)/2 >= 0:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x, y = map(int ,input().split())
# check for only cranes
if x * 2 == y or x * 4 == y or y % x == 2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for v in range(x+1):
    a = y - 2 * v
    z = x - v
    if z != 0:
        b = a / z
        if (b % 4) == 0:
            ans = "Yes"
            break
    else:
        if a == 0:
            ans = "Yes"
        
        
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
turu = 4
kame = 2
flag = 'No'
for i in range(a):
  for j in range(i):
    if b == turu * i + kame * j:
      flag = 'Yes'

print(flag)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

def main():
	x, y = map(int, input().split())
	for a in range(1, x):
		if y == a * 2 + 4 * (x - a):
			print('yes')
			return
	if (y == x * 2) or (y == x*4):
		print('yes')
		return

	print('no')
	return

if __name__ == "__main__":
	main()

Submission status: Wrong Answer

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

mm = l*4

if mm > m:
  a = (mm - m) % 2
  if a == 0:
      print("Yes")
  else:
      print("No")
else:
  print("No")

Submission status: Wrong Answer

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


l=list(range(2*X,4*X,2))
#print(l)

flag=False
for i in range(len(l)):
    if l[i]==int(Y):
        flag=True

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

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())
flag = False
for i in range(X):
    for j in range(X-i):
        
        if 2*i+4*j == Y:
            flag = True
            break


if flag:
    print("Yes")
else:
    if X == 1:
        if Y == 2 or Y == 4:
            print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X, Y = map(int,input().split())
crain = (4 * X - Y) / 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())
for i in range(101):
    j = x - i
    if y == 2 * i + 4 * j:
        print("Yes")
        exit()
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X,Y = map(int, input().split())
if (X*4 < Y):
  print("No")
  exit(0)

cnt = 0
for i in range(X):
  idx = i+1
  if Y >= 4:
    Y = Y % 4
  else:
    Y = Y % 2
  cnt += 1
if Y == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())
if Y/X <= 4:
    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:
  print("Yes")
  
else:
  print("No")

Submission status: Wrong Answer

Solution code:
def iput(): return int(input())
def mput(): return map(int, input().split())
def lput(): return list(map(int, input().split()))

def solve():
    x, y = mput()
    hoge = (x * 4 - y) / 2
    if hoge % 1 == 0 and hoge >= 0:
        if (x-hoge) % 1 == 0:
            print("Yes")
    else:
        print("No")
    print(hoge)
    return 0

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
input1 = list(map(int, input().split()))
X = input1[0]
Y = input1[1]

judge = False
if ((4*X - Y) % 2 == 0 and (4*X - Y) >= 0):
    judge = True

print("Yes" if judge == True else "No")