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:
from math import *

def cin(): # To take limited number of inputs
    return map(int,input().split())

def cins(): # To take space sepreated strings
    return input.split()

def cino(test=False): # To take individual int input (test = False)
    if not test:
        return int(input())
    else: # To take string input (test = True)
        return input()

def cina(): # array input
  return list(map(int,input().split()))

def ssplit(): # multiple string input
    return list(input().split())

def printlist(l): # To print space seperated array
    for i in l:
        print(i,end=" ")

def main():
    a,b = cin()
    cnt = 0
    while b>0:
        b-=2
        cnt += 1
    if cnt<=a:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
res = "NO"
for i in range(x + 1):
    for j in range(x + 1 - i):
        if 2 * i + 4 * j == y:
            res = "YES"
            
print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

crain = (4*ani-foot)/2
if crain.is_integer() and crain > 0:
    print("Yes")
else:
    print("False")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

ret = True
if 4 * X  - Y % 2 != 0:
  ret = False
if 4 * X  - Y % 2 < 0:
  ret = False
if Y - 2 * X % 2 != 0:
  ret = False
if Y - 2 * X < 0:
  ret = False
if ret:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys


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


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

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

    print("No")




if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# 幅優先探索（行きがけ）
import collections
import sys


def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())


def main():
    X, Y = LI()
    ans = "No"
    for i in range(X+1):
        for j in range(X+1):
            if 2*i+4*j == Y:
                ans = "Yes"
                break

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

    A = [2] * x
    for i in range(x):
        if sum(A) == y:
            print('Yes')
            exit()

        A[i] = 4

    print('No')


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

for i in range(X):
  if(4*i+2*(X-i)==Y):
    flag="Yes"

print(flag)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if leg%2==1:
    print('No')
elif 4*n < leg:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
def solve():
    x, y = map(int, input().split())
    
    if y%2 != 0:
        return 'No'
    if x*4 >= y:
        return 'Yes'

    return 'No'



print(solve())

Submission status: Wrong Answer

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

if Y % 2 != 0:
    print('No')
elif 4 * X < 100:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
#!python3

import sys
iim = lambda: map(int, sys.stdin.readline().rstrip().split())

def resolve():
    it = map(int, sys.stdin.read().split())
    X, Y = next(it), next(it)

    for a in range(1, 101):
        b = X - a
        if 2*a + 4*b == Y:
            print("Yes")
            return
    print("No")

if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(1, x+1):
    if 2*i + 4*(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):
  num = i*2 + (X-i)*4
  if num == Y:
    print("Yes")
    exit(0)
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:
X, Y = map(int, input().split())
if Y / 2 < X:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0
for turu in range(0, 101):
    kame = x - turu
    if turu * 2 + kame * 4 == y:
        ans = "Yes"
if ans == 0:
    print("No")
else:
    print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
if(y>=2*x and (y-2*x)%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(101):
    if i * 2 + (x - i) * 4 == y:
        ans = 'Yes'
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
def main():
    X,Y = map(int, input().split())
    for i in range(1,X+1):
        if (i*2 + (X-i)*4) == Y:
            print("Yes")
            break
    else:
        print("No")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
X, Y = map(int, input().split())
# 文字列の入力
#s = input()
#開業されたN個要素を受け付ける
#input_list = [list(map(int, input().split())) for i in range(N)]

ans = "YES"

if not Y%2 == 0:
    ans = "NO"
elif Y < 2*X:
    ans = "NO"
elif 4*X < Y:
    ans = "NO"

print(ans)

Submission status: Wrong Answer

Solution code:
X, Y = map(int,input().split())
A = Y // 2
B = int(A / 2 + 0.5)
if (B <= X <= A):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

for i in range(1, A+1):
    f = 2 * i + 4 * (A - i)
    if f == B:
        print("Yes")
        break
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
if b%2!=0:
	print("NO")
elif a>=b//4 and a<=b//2:
	print("YES")
else:
	print("NO")

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
X, Y = map(int, input().split())
t = Y - X * 2
if t == 0:
  print("Yes")
  exit(0)
for i in range(X + 1):
  t -= 2
  if t == 0:
    print("Yes")
    exit(0)
print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_list(N): return [s_list() for _ in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    x, y = i_map()

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

    print('No')

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#import functools

def main():
    X, Y = tuple(int(c) for c in input().split(' '))
    for i in range(X+1):
        ashi = i*2 + (X-i)*4
        if ashi==Y:
            print('YES')
            #print(i, X-i)
            break
    else:
        print('NO')


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

for i in range(X):
  tsuru = X - i
  if(i*4+tsuru*2 == Y):
    fl = 1
    break
if(fl == 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):
    if i*2+(x-i)*4==y:
        print("Yes")
        exit()
print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#デフォルト
import itertools
from collections import defaultdict
import collections
import math
import sys
sys.setrecursionlimit(200000)
mod = 1000000007

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

flag = False
for i in range(x + 1):
    for j in range(x - i + 1):
        if i * 2 + j * 4 == y:
            print("Yes")
            flag = True
            break
    if flag:
        break

if flag == False:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys

input = sys.stdin.readline


def S():
    return input().rstrip()


def I():
    return int(input())


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


x, y = MI()

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

print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(len(x)):
    if x[i] == 0:
        print(i+1)
        exit()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

is_yes = False
for i in range(1, X+1):
    if 2*i+4*(X-i) == Y:
        is_yes = True
        break

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

Submission status: Wrong Answer

Solution code:
import sys


def ip():
    return sys.stdin.readline()


def ipl():
    return sys.stdin.readline().split()


def solve():
    a, b = map(int, ipl())
    if 4*a - b > 0 and  (4*a - b) % 2 == 0:
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
X, Y = (int(i) for i in input().split())  

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8

import sys
import math
import collections
import itertools
import bisect
INF = 10 ** 13
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return x if y == 0 else gcd(y, x%y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def LS() : return input().split()
def RS(N) : return [input() for _ in range(N)]
def LRS(N) : return [input().split() for _ in range(N)]
def PL(L) : print(*L, sep="\n")
def YesNo(B) : print("Yes" if B else "No")
def YESNO(B) : print("YES" if B else "NO")

X, Y = LI()

flag = False

for i in range(X+1):
    for j in range(X-i+1):
        if i*2 + j*4 == Y:
            flag = True

YesNo(flag)

Submission status: Wrong Answer

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

ans = "No"
for i in range(101):
    if ans != "No":
        break
    for j in range(101):
        if i+j > X:
            break
        if i*2 + j*4 == Y:
            ans = "Yes"
            break
print(ans)

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
if 2*x -y >= 0 and -x + y >= 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):
  j = X-i
  a = i*2 + j*4
  if a == Y:
    ans="Yes"
    break
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import exit
import math
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

x,y = mi()

if (4*x-y)%2 == 0 and (4*x-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):
  for j in range(x+1-i):
    if 2*i+4*j==y:
      print("Yes")
      exit(0)
print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

answer = 'No'

for i in range(animal):
    temp = 2 * (i+1) + 4 * (animal-i-1)
    if temp == leg:
        answer = 'YES'
        break

print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

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

    print("Yes" if 0<k and 0<t else "No")



if __name__ == "__main__":
  main()

Submission status: Wrong Answer

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

for c in range(100):
    if 4*x-2*c == y and y >= 0:
        print("Yes")
        exit()
print("No")

Submission status: Wrong Answer

Solution code:
import sys
import math
from collections import deque
import heapq
import itertools
from decimal import Decimal
import bisect
from operator import itemgetter
MAX_INT = int(10e18)
MIN_INT = -MAX_INT
mod = 1000000000+7
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

def tami(turu, kame):
  if turu*2 + kame*4 == y:
    #print(turu,kame)
    return True
  else:
    return False

x,y =IL()

for turu in range(101):
  kame = x - turu
  if tami(turu, kame):
    print("Yes")
    exit()
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys


def ip():
    return sys.stdin.readline()


def ipl():
    return sys.stdin.readline().split()


def solve():
    a, b = map(int, ipl())
    if 4*a - b >= 0 and  (4*a - b) % 2 == 0:
        print('Yes')
    else:
        print('No')

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# 2 legs or 4 legs
# X animals Y legs

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

found = False
if (X == 1) :
    if (Y == 2 or Y == 4) :
        found = True
        
for i in range(X) :
    for k in range(i) :
        kame_legs = 4 * i
        tsuru_legs = 2 * (X-i)
        if (Y == kame_legs + tsuru_legs) :
            found = True
            break

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
ju = 0
for i in range(1,x+1):
    an = 2*i+4*(x-i)
    if an ==y:
        ju=1
        break

if ju==1:
    print("Yes")
else:
    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")
        quit()
print("No")

Submission status: Wrong Answer

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

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())
for i in range(y+1):
  if i * 2 + (y-i) * 4 == y:
    print("Yes")
    exit()
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 i + j <= x:
            if i * 2 + j * 4 == y:
                print("Yes")
                exit()

print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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