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())
bool = False
for i in range(x+1):
    for j in range(x-i+1):
        if 2*i + 4*j == y:
            bool = True
if bool:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

kame = (y-2*x)//2
turu = x - kame

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

Submission status: Wrong Answer

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

kame = (y-2*x)//2
turu = x - kame

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

Submission status: Wrong Answer

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

flag = True
for kame in range(X):
    tsuru = X - kame
    if (4 * kame + 2 * tsuru == Y):
        print('Yes')
        flag = False
        break

if(flag):
    print('No')

Submission status: Wrong Answer

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

n2 = [i for i in range(2,101) if i % 2 == 0]
n4  = [i for i in range(4,101) if i % 4 == 0]

for i in n2:
    for j in n4:
        if i+j == y:
            if n2.index(i) + n4.index(j) + 2== x:
                print('Yes')
                exit()

print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

l = []
flag = False

for i in range(1,x+1):
    l.append((i,x-i))

for xx,yy in l:
    if y == (xx*2+yy*4):
        flag = True
        break
if flag:
    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 j in range(x+1):
        if 2*i+4*j==y:
            ans=1
print('Yes'if ans else'No')

Submission status: Wrong Answer

Solution code:
import sys
from collections import deque, defaultdict, Counter
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush
from math import ceil, floor, sqrt, gcd, inf
from copy import deepcopy
import numpy as np
import scipy as sp

INF = inf
MOD = 1000000007

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

tmp = 0
res = "No"

a = y - 2 * x
b = 4 * x - y
if 0 <= a <= x and 0 <= b <= x and a % 2 == 0 and b % 2 == 0:
    res = "Yes"

print(res)

Submission status: Wrong Answer

Solution code:
import sys
from collections import deque, defaultdict, Counter
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush
from math import ceil, floor, sqrt, gcd, inf
from copy import deepcopy
import numpy as np
import scipy as sp

INF = inf
MOD = 1000000007

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

tmp = 0
res = "No"

a = y - 2 * x
b = x - a
if 0 <= a <= x and 0 <= b <= x:
    res = "Yes"

print(res)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if Y % 2 == 0:
    K = Y//2 - X
    if K > 0:
        if X - K >= 0:
            print("Yes")
            exit()

print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

for i in range(x):
    y -= 2

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

for i in range(x):
    y -= 2

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

Submission status: Wrong Answer

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

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

for i in range(x):
    y -= 2

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

Submission status: Wrong Answer

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

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

for i in range(x):
    y -= 2

if y <= y*2:
    print('Yes')

Submission status: Wrong Answer

Solution code:
def main():
    a,b = map(int,input().split())
    leg  = 0
    for i in range(1,a+1):
        if 2*i +4*(a-i) == b:
            print('Yes')
            exit()
    print('No')
main()

Submission status: Wrong Answer

Solution code:
def main():
    a,b = map(int,input().split())
    leg  = 0
    for i in range(a):
        if 2*i +4*(a-i) == b:
            print('Yes')
            exit()
    print('No')
main()

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
leg  = 0
for i in range(2**a):
    leg = 0
    for j in range(a):
        if (i & 1 <<j):
            leg +=4
        else:
            leg +=2
    print(leg)
    if leg == b:
        print('Yes')
        exit()
print('No')

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
leg  = 0
if leg >b:
    print('No')
for i in range(a):
    leg = 0
    for j in range(a):
        if (i & 1 <<j):
            leg +=4
        else:
            leg +=2
    if leg == b:
        print('Yes')
        exit()
print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
readline = stdin.readline
def i_input(): return int(readline().rstrip())
def i_map(): return map(int, readline().rstrip().split())
def i_list(): return list(i_map())


def main():
    X, Y = i_map()
    ans = False
    z = Y - (X * 2)
    if z % 2 == 0 and (z // 2) <= X:
        ans = True
    print("Yes" if ans else "No")

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

r = range(2 * X, 4 * X, 2)

for i in r:
  if i == Y:
    count += 1

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

Submission status: Wrong Answer

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

ans = 0

if Y/2 == X: ans = 1

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

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

Submission status: Wrong Answer

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

ans = 0

if Y/2 == X: ans = 1

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
flag = True
for turtle in range(1, x + 1):
    numTurtle = turtle * 4
    turu = x - turtle
    if y == numTurtle + turu * 2 or y == numTurtle:
        print ("Yes")
        flag = False
        break
for turu in range(1, x + 1):
    numTuru = turtle * 2
    turtle = x - turu
    if y == numTuru + turtle * 2 or y == numTuru:
        print ("Yes")
        flag = False
        break
if flag:
    print("No")

Submission status: Wrong Answer

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

def INT(): return int(input())
def MAPINT(): return map(int, input().split())
def LMAPINT(): return list(map(int, input().split()))
def STR(): return input()
def MAPSTR(): return map(str, input().split())
def LMAPSTR(): return list(map(str, input().split()))

f_inf = float('inf')

x, y = LMAPINT()
for i in range(x+1):
  for j in range(x+1):
    if i + j == x and i*2 + j*4 == y:
      print('YES')
      exit()
print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

t = int(y / 4)
m = int(y % 4)

print(t)

if t > x or m % 2 != 0: 
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

t = int(y / 4)
m = int(y % 4)

print(t)

if t > x or m != 2: 
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

z = x * y
t = int(z / 4)
m = int(z % 4)

print(t)

if t > x or m != 2: 
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

z = x * y
t = int(z / 4)
m = int(z % 4)

print(t)

if t >= x or m != 2: 
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

z = x * y
t = int(z / 4)
m = int(z % 4)

print(t)

if t >= x or m % 2 != 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

z = x * y
t = int(z / 4)
m = int(z % 4)

print(t)

if t >= x and m % 2 != 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

z = x * y
t = int(z / 4)
m = int(z % 4)

print(t)

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

Submission status: Wrong Answer

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

z = x * y
t = int(z / 4)

if t >= x:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

z = x * y
t = z / 4

if t >= x:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if 2 <= y <= 8:
    if (x*y) %2 == 0:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
animals_and_legs=input()
list=animals_and_legs.split()
animals=int(list[0])
legs=int(list[1])
j=animals
i=0
something=True
while i<=animals:
    if i*4+j*2==legs:
        print("yes")
        something=False
        break
    i=i+1
    j=j-1
if something is True:
    print("no")

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
s,t = map(int,input().split())
print('Yes' if s*2 <= t <= s*4 else 'No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

    print('No')


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
   x,y=map(int,input().split())
   if(4*x<y or (y&1)==1):
       print("No")
   else:
        print("Yes")

    
main()

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
low = a*2
high = a*3
if b<low or b>high:
  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
print(a, b)
if a.is_integer and b.is_integer == True:
    if a >= 0 and b >= 0:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

#偶数であること
if Y%2 ==0:
    if float(Y)/X <= 4:
        print('Yes')
        exit()

print('No')

Submission status: Wrong Answer

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

for i in range(N+1):
  count = i * 2 + (N - i) * 4
  if count == A:
    print('Yes')
print('No')

Submission status: Wrong Answer

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

ans = 0

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if y % 2 != 0:
    ans = "No"
elif (y/2 - x >= 0) and (y/2 - x <= 99):
    ans = "Yes"
else:
    ans = "No"

print(ans)

Submission status: Wrong Answer

Solution code:
import sys

X, Y = map(int,input().split()) #X_動物の数　Y_脚の数


ALL = X*2
for i in range(X):
    if ALL == Y:
        print('Yes')
        sys.exit()
    
    ALL += 2

print('No')

Submission status: Wrong Answer

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

low = y//4
high = y//2

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

Submission status: Wrong Answer

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

low = y//4
high = y//2

if low <= x <= high:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

low = y//4
high = y//2

if low <= x <= high:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

X, Y = list(map(int, input().split()))
is_ok = False
for i in range(1, X + 1):
    if (i * 2 + (X - i) * 4) == Y:
        is_ok = True
        break
ans = "Yes" if is_ok else "No"
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X,Y=list(map(int,input().split()))
judge=False
for i in range(1,X):
  if i*2+(X-i)*4==Y:
    judge=True
if judge:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
X,Y=list(map(int,input().split()))
judge=False
for i in range(1,X+1):
  if i*2+(X-i)*4==Y:
    judge=True
if judge:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0

foots = 2*int(x)

for i in  range(int(x)+1):
    if foots == y:
        ans +=1
    foots += 2

print(foots)

if ans == 1:
    print("Yes")

else:
    print("No")

Submission status: Wrong Answer

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

ans = 0

foots = 2*int(x)

for i in  range(int(x)):
    if foots == y:
        ans +=1
    foots += 2

if ans == 1:
    print("Yes")

else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

K = Y*0.5-X
T = 2*X - Y*0.5

if 0<= T <= X and 0<= K <= X:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

K = Y*0.5-X
T = 2*X - Y*0.5

if T >= 0 and K >= 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

K = Y * 0.5 -X
T = Y * 0.5 - K *  2

if T >= 0 and K >= 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

cnt=0

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

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

Submission status: Wrong Answer

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

ans = "No"
for c in range(X + 1):
    t = X - c
    if 2 * c + 3 * t == Y:
        ans = "Yes"
        break
if ans == "No":
    for t in range(X + 1):
        c = X - t
        if 2 * c + 3 * t == Y:
            ans = "Yes"
            break

print(ans)

Submission status: Wrong Answer

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

ans = "No"
for c in range(X + 1):
    t = X - c
    if 2 * c + 3 * t == Y:
        ans = "Yes"
        break

print(ans)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8

a, b = map(int, input().split())
if 2 ** a == b:
    print("Yes")
else:
    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 2*X <= Y and Y <= 4*X:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())
Max = X*4
while Max >= Y:
  if Max == Y:
    print('Yes')
    exit()
  Max -= 2
print('No')

Submission status: Wrong Answer

Solution code:
import numpy as np
import numpy.linalg as linalg 

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

A = np.array([[1, 1],
              [2, 4]])
A_inv = linalg.inv(A)

B = np.array([X , Y])

C = np.dot(A_inv, B)
if C[0] >= 0 and C[1] >= 0 :
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

turtle_leg = 4
crane_leg = 2

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

if __name__ == "__main__":
    sol()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if x >= 0 and b >= 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x, y = (int(a) for a in input().split())
foot = 0
y_tmp = y

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

print('No')

Submission status: Wrong Answer

Solution code:
x, y = (int(a) for a in input().split())
foot = 0
y_tmp = y

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

print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from numpy import linalg,array,all
def ans():
  x,y=map(int,input().split())
  if y&1==1 or 2*x>=y or y>=4*x:
   print("No")
   return
  A = [[2, 4], [1,1]] 
  B = array([x,y])[::-1]
  C=linalg.solve(A, B)
  print("Yes" if all(C>=0) else "No")
ans()

Submission status: Wrong Answer

Solution code:
from numpy import linalg,array,all
x,y=map(int,input().split())
if y%2!=0:
  print("No")
  exit
A = [[2, 4], [1,1]] 
B = array([x,y])[::-1]
C=linalg.solve(A, B)
print("Yes" if all(C>=0) else "No")

Submission status: Wrong Answer

Solution code:
from numpy import linalg,array,all
A = [[2, 4], [1,1]] 
B = array(list(map(int,input().split()))) [::-1]
C=linalg.solve(A, B)
print("Yes" if all(C>=0) else "No")

Submission status: Wrong Answer

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

flg = -1

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

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

Submission status: Wrong Answer

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

flg = -1

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

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

Submission status: Wrong Answer

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

flg = -1

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
X, Y = list(map(int, input().split()))
if Y >= 2*X and Y%2 == 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+1):
    for j in range(y+1):
        if i + j > x:
            continue

        if i*2 + j*4 == y:
            ans = 'Yes'

print(ans)

Submission status: Wrong Answer

Solution code:
X,Y = (int(x) for x in input().split())
crane = 0
turtle = 0

for i in range(X):
  crane = (i+1)
  turtle = X-crane

  if crane*2 + turtle*4 == Y:
    print('Yes')
    break
  elif i == X-1:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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