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())
print("Yes" if (4*x-y)%2==0 and 4*x>=y else "No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

while(1):
    if i * 2 + (x - i) * 4 == y or i * 4 + (x - i) * 2 == y:
        print("Yes")
        break    
    if i > x:
        print("No")
        break
    i += 1

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 i==0 and j==0:continue
    if 2*i+4*j==y:
      print("Yes")
      exit(0)
print("No")

Submission status: Wrong Answer

Solution code:
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from itertools import (
    accumulate, combinations, combinations_with_replacement, groupby,
    permutations, product)
from math import (acos, asin, atan, ceil, cos, degrees, factorial, gcd, hypot,
                  log2, pi, radians, sin, sqrt, tan)
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits


def inp():
    return(int(input()))


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


def instr():
    s = input()
    return(list(s[:len(s)]))


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


a, b = invr()
res = "NO"
for i in range(a+1):
    if i*2 + (a-i)*4 == b:
        res = "YES"
        break
print(res)

Submission status: Wrong Answer

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

def  getAB(x,y):
  b=(y-2*x)/2
  a=x-b
  if a>=0 and b>=0:
    return 'YES'
  else:
    return 'NO'
  
print(getAB(X,Y))

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
from math import floor
def Main(X, Y):
    a = (Y-2*X)/2
    b = (4*X-Y)/2
    
    if (a > 0 and floor(a) == a) or (b > 0 and floor(b) == b):
        return "Yes"
    else:
        return "No"
        
    
res = Main(X, Y)
print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

x,y = list(map(int, input().split()))
tmp = y%2
while tmp == 0:
    y /= 2
    tmp = y%2
#    print(y)
if y ==1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

x, y = list(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:


def resolve():
    import sys
    input = sys.stdin.readline
    xy = [int(x) for x in input().rstrip().split()]
    x = xy[0]
    y = xy[1]
    
    for i in range(1, x+1):
        if((i * 2 + (x-i)*4) == y):
            print("Yes")
            exit()
    
    print("No")


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

if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
total_num, reg_total = map(int, input().split())

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


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

    if x * 2 <= y <= x * 4:
        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(1,100+1):
    if i*2+(x-i)*4==y:
        print("Yes")
        break
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
flag = False
for i in range(2*x, 4*x)[::2]:
    if y == i:
        flag = True

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

Submission status: Wrong Answer

Solution code:
X,Y=map(int, raw_input().split())
for t in range(X+1):
    for k in range(X-t+1):
        if t*2+k*4==Y:
            print "Yes"
            quit()
else:
    print "No"

Submission status: Wrong Answer

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

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

a = x * 4

if a < y:
    print('No')
    exit(0)
    
print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

def main():
  x, y = map(int, input().split())
  
  for i in range(x+1):
    if 2 * i + 4 * (x - i) == y:
      print('YES')
      exit()
  print('NO')
  
  
if __name__ == "__main__":
  main()

Submission status: Wrong Answer

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

if 4*XY[0] - XY[1] >= 1 and -3*XY[0] + XY[1] >= 1:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

is_exist = False
for gruidaes in range(X + 1):
  turtles = X - gruidaes
  if turtles * 4 + gruidaes * 2 == Y:
    is_exist = True
    break

if is_exist:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

Solution code:
X,Y = map(int, input().split())
ans = 2*X-Y/2
if ans >= 0 and ans%1 == 0:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if y//4 > x:
  print("No")
else:
  if y%2 == 1:
    print("No")
  else:
    print("Yes")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

a=(4*x - y)/2

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

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

    tsuru = x
    kame = 0

    while tsuru > 0:
        if tsuru * 2 + kame * 4 == y:
            return "Yes"
        tsuru -= 1
        kame += 1

    return "No"

if __name__ == "__main__":
    print(main())

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    x, y = map(int, input().strip().split())
    flag = False

    if y % 2 == 1:
        print("No")
    else:
        sum = x * 4
        if sum == y:
            print("Yes")
        else:
            for i in range(x):
                sum -= 2
                if sum == y:
                    print("Yes")
                    break
                    flag = True
            if not flag:
                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 - i + 1):
        if Y == i * 4 + j * 2:
            print("Yes")
            exit()
print("No")

Submission status: Wrong Answer

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

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

else:
    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-i+1):
        if 2*i+4*j==y:
            print('Yes')
            sys.exit()
print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
X, Y = map(int, input().split())
if X*4 < Y:
    print('No')
    sys.exit()
else:
    i, j = 0, X
    while j != 0:
        if 2*i + 4*j == Y:
            print('Yes')
            sys.exit()
        else:
            i += 1
            j -= 1
    print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

flag = False
if x == 1:
    if y == 2 or y == 4:
        print("Yes")
        exit()
for turu in range(x):
    for kame in range(x - turu):
        if turu*2 + kame*4 == y:
            print("Yes")
            exit()
if flag == False:
    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")
        exit()
print("No")

Submission status: Wrong Answer

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

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

print("No")

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np
import math
from collections import deque 
from functools import reduce

# input = sys.stdin.readline

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

x2 = y // 2
xe = y // 4

if (x <= x2 and x >= xe):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

print('No')

Submission status: Wrong Answer

Solution code:
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
INF = 1000000000000

x,y = LI()

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

if(flg):
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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

Y = Y // 2
if X<=Y and 2*X>=Y:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

c = (4*x-y)//2
t = (y-2*x)//2

if 0 <= c and 0 <= t:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#B - Crane and Turtle
X,Y= map(int,input().split())

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

Submission status: Wrong Answer

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

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

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 >= 0 and 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())

if not y % 2 and x * 2 <= y <= x * 4:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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

# print(y-x*2)
if y-x*2 <= x:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
z = list(map(int, input().split()))
count = 0
for i in range(1, z[0]+1):
  if i*2+(z[0]-i)*4 == z[1]:
    count = 1
if count == 1:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

if z > 0:
    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 < x:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x , y = map(int,input().split())
bool = False
for i in range(0, x):
    leg = 2 * i + 4 *(x -i)
    if leg == y :
        bool = True

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

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
if b%2==0:
    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(x):
    for j in range(x):
        if i+j==x and 2*i+4*j==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-i, X+1):
        if Y == i*2 + j*4:
            print('Yes')
            sys.exit()
print('No')

Submission status: Wrong Answer

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

for p in range(101):
    q = x - p
    if q < 0:
        break
    if 2*p + 4*q == y:
        print('Yes')
        break
else:
    print('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:
x, y = map(int, input().split())
key = False
for turuN in range(1, x+1):
  kameN = x - turuN
  if turuN*2 + kameN*4 == y: key = True
if key: print("Yes")
else: print("No")

Submission status: Wrong Answer

Solution code:
#!python3.8
# -*- coding: utf-8 -*-
# abc170/abc170_b
import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    X, Y = i2nn()
    if Y % 2 == 0 and 4 * X - Y >= 0:
        print('Yes')
    else:
        print('No')
    return

main()

Submission status: Wrong Answer

Solution code:
def main():
    from builtins import int, map, list, print
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = (lambda: (sys.stdin.readline()).rstrip())
    input_list = (lambda: input().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

    X, Y = input_number_list()

    print(['No', 'Yes'][2*X <= Y <= 4*X])


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

# process
result = False
for i in range(0, 25):
    if Y == 2*(X-i) + i*4:
        result = True
        break

# output
print("Yes" if result else "No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

def func(x,y):
    if y % 2 == 1:
        return False
    if 4*x <= y:
        return False
    else:
        return True
    
if func(x,y):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

t=y/2-x
c=x-t

if(t>=0 and c>=0 and abs(t)==t and abs(c)==c):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
print(' YNeos'[x*2<=y<=x*4::2])

Submission status: Wrong Answer

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

flag=False

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

if flag:
    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(0,x+1):
        if i*2 + j*4 == y:
            print('Yes')
            exit()
print('No')

Submission status: Wrong Answer

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

if not 2*X <= Y <= 4*X:
  flag = False
if not 0 <= (Y-2*X)/2 <= X:
  flag = False

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

a = 2 * X

if a == Y:
  print('Yes')
  sys.exit()

for i in range(X+1):
  a = a + 2
  if a == Y:
    print('Yes')
    sys.exit()
    
print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

for i in range(x):
    turtle=i
    crane=x-i
    leg=(turtle*4)+(crane*2)
    if leg==y:
        print("Yes")
        sys.exit()

print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
x, y = M()
ans = 'No'
for i in range(x+1):
    for j in range(x-i+1):
        temp = 2*i + 4*j
        if y == temp:
            ans = 'Yes'

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
if Y % 2 != 0:
    print('No')
    exit()

nokori4 = Y // 4

if nokori4 == 0:
    nokori2 = Y // 2
else:
    nokori2 = nokori4 // 2
if nokori4 + nokori2 == X:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

print('No')

Submission status: Wrong Answer

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

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

if (a >= 0) & (b >= 0):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(x+1):
    ans=i*4
    for j in range(x+1-i):
        if ans+j*2==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 - i + 1):
        print(i, j)
        if i * 2 + j * 4 == Y:
            print('Yes')
            exit()
print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x , y = map(int,input().split())
bool = False
for i in range(1, x+1):
    leg = 2 * i + 4 *(x -i)
    if leg == y :
        bool = True

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

    for i in range(1, X+1):
        turu = 2*i
        kame = 4*(X-i)
        tot = turu + kame
        if tot == Y:
            print("Yes")
            return
    else:
        print("No")

if __name__ == "__main__":
    resolve()

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:
import sys
input = lambda: sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print('No')

Submission status: Wrong Answer

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

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

print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
x,y = map(int, input().split(" "))
z = y/2-x
if z>=0 and z<=x:
  print("yes")
else:
  print("no")

Submission status: Wrong Answer

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

def hantei(x, y):
    for i in range(1, x+1):
        if 2 * i + 4 * (x - i) == y:
            return True
    return False

if hantei(x, y) == True:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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