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:
# -*- coding: utf-8 -*-
x, y = map(float, input().split())
cranes = (4 * x - y) / 2

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

Submission status: Wrong Answer

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

for a in range(1,x+1):
    if 2*a+4*(x-a)==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 (4*x-y)/2 >= 0:
	if (y-2*x)/2 >= 1 or (4*x-y)/2 >= 1:
		if (y-2*x)/2%1 == 0 and (4*x-y)/2%1 == 0:
			print('Yes')
else:
	print('No')

Submission status: Wrong Answer

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

crit=4*X-Y

ans="No"
if crit>0 and int(crit)==crit:
  ans="Yes"

print(ans)

Submission status: Wrong Answer

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

max_y = 4 * X
min_y = 2 * X

if max_y >= Y >= min_y:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys

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

for i in range(X):
    for j in range(X,1,-1):
        print(i)
        print(j)
        if Y == 4*i + 2*j:
            print("YES")
            sys.exit()

if X == 1:
    if Y == 4 or Y == 2:
        print("YES")
        sys.exit()

print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if flag==0:
    print("no")
else:
    print("yes")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# import math
# from collections import Counter

# N = int(input()) # 1行, 単数
# arg = list(map(int, input().split())) # 1行, 配列
# D = Counter(arg) # 出現数カウント

# print('Yes')
# print('No')
# print()
N, M = map(int,input().split())
crain = (4 * N - M) / 2
if crain.is_integer() and crain > 0:
    crain = int(crain)
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print('No')

Submission status: Wrong Answer

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


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


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


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


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


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


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


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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import numpy as np


def main(X, Y):
    if 2*X <= Y and 4*X >= Y:
        return "Yes"
    return "No"


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

Submission status: Wrong Answer

Solution code:
def check(X, Y):
    for a in range(X+1):
        for b in range(X+1-a):
            if Y == 2*a+4*b:
                return True
    return False


X, Y = map(lambda x: int(x), input().split(" "))

flag = check(X, Y)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

x, y = map(int, input().split()) # x:頭数 y:足
for i in range(x):
    if i * 4 + (x - i) * 2 == y:
        print('Yes')
        sys.exit()

print('No')

Submission status: Wrong Answer

Solution code:
import copy

XY = input().split()
X = int(XY[0])
Y = int(XY[1])
if Y % 2 == 1:
    print("No")
if (4 * X - Y) / 2 <= X:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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


for i in range(1,100+1):
    for j in range(1,100+1):
        if i + j > X:
            break
        if (i*2 + j*4) == Y:
            print('Yes')
            exit()

print('No')

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
if X == 1:
    if 2 * 1 == Y:
        print('Yes')
        exit()

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from numpy.linalg import solve

x, y = map(int, input().split())
left = [[1, 1],
        [2, 4]]

right = [x, y]

a = solve(left, right)

left = [[1, 1],
        [4, 2]]

right = [x, y]
b = solve(left, right)
if (a[0].is_integer() is True and a[1].is_integer() is True) or (b[0].is_integer() is True and b[1].is_integer() is True):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
def resolve():
    '''
    code here
    '''
    X, Y = [int(item) for item in input().split()]

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


if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

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

sun = 0
flag = True
for i in range(1, x+1):
    sum = i*2
    if sum == y:
        print('Yes')
        flag = False
        break
    for j in range(1, x+1):
        if i+j >x:
            break
        sum += j*4
        if sum == y:
            print('Yes')
            flag = False
            break
if flag:
    print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
for a in range(0,101):
    c = 4*x-2*a
    if c>0 and c==y:
        print('Yes')
        break
    elif (y - 2*a)%4==0:
        d = (y-2*a)//4
        if a+d==x:
            print('Yes')
            break
else:
    print('No')

Submission status: Wrong Answer

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

if (4 * X - Y) % 2 == 1:
    print("No")

if (-2 * X + Y) % 2 == 1:
    print("No")

turu = (4 * X - Y) // 2
kame = (-2 * X + Y) // 2
if turu == 0 and kame == 0:
    print("No")
elif turu < 0 or kame < 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

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

if (y % 6 == 2) or (y % 6 == 4):
    print("Yes")
else:
    print("no")

Submission status: Wrong Answer

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

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

print(check())

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


# 動物の足の数を計測する必要がある
def check():
    return 

# 動物の可能性を考える
pattern = 0
for i in range(0, x):
    # 2本足,4本足の動物の数
    leg2_animal = i+1
    leg4_animal = x - leg2_animal
    # 全体の足の数を数えてみる
    sum_legs = leg2_animal * 2 + leg4_animal * 4

    if sum_legs == y:
        pattern += 1

if pattern > 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

r = (4*x - y)/(2*x)

s = int(round(2 * r * x + 4 * (1 - r) * x))

c = s == y and 0 <= r <= 1

print("Yes" if c else "No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(26):
  if x - i <= 0:
    print('No')
  elif y == 2 * (x + i):
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

Solution code:
#!/usr/local/bin/python3
# coding: utf-8

ha = input()
kita = ha.split(" ")
x = int(kita[0])
y = int(kita[1])
ifAshi = False

for i in range(x):
    if((y - 2*i)%4 == 0):
        if((x-i) == ((y - 2*i)/4)):
            ifAshi = True

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

Submission status: Wrong Answer

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

if Y<=X:
    print('No')
else:
    pass

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

Submission status: Wrong Answer

Solution code:
import sys
X,Y=[int(x) for x in input().rstrip().split()]
y=float((Y-2*X)//2)
x=float(X-y)

if x.is_integer() and y.is_integer():
  if x==0 and y==0:
    print("No")
    sys.exit()

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

Submission status: Wrong Answer

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

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

if (tsuru.is_integer() and tsuru > 0) or (kame.is_integer() and kame > 0):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        # for line in sys.stdin:
        #     lines.append(line)
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    (x, y) = [int(e) for e in lines[0].split(' ')]

    return (x, y)


def solve(x, y):
    
    result = 'No'
    for c in range(1, 100):
        for t in range(1, 100):
            if c + t == x and 2 * c + 4 * t == y:
                result = 'Yes'
                break
                


    return result    


def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
XY = list(map(int, input().split()))
 
if 2 * XY[0] - XY[1] / 2 == 0 and -XY[0] + XY[1] / 2 == 0:
  print('NO')
 
if 2 * XY[0] - XY[1] / 2 >= 0 and -XY[0] + XY[1] / 2 >= 0:
  print('YES')
else:
  print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

flag = 0

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

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

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

Submission status: Wrong Answer

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

for turu in range(x//2+2):
    for kame in range(x//4+2):
        if turu+kame==x and turu*2 + kame*4 == 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 i*2+(X-i)*4==Y:
		print("Yes")
		exit()
print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# import math
# from collections import Counter

# N = int(input()) # 1行, 単数
# arg = list(map(int, input().split())) # 1行, 配列
# D = Counter(arg) # 出現数カウント

# print('Yes')
# print('No')
# print()
N, M = list(map(int, input().split()))
for i in range(1, N+1):
    # 足の数
    f = 2 * i + 4 * (N - i)
    if f == M:
        print('Yes')
        break
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if x * 2 == y:
    print('Yes')
    quit()

if x * 4 == y:
    print('Yes')
    quit()
    
for i in range(x):
    zzz = y - i * 4
    if zzz // (x - i) == 2:
        print('Yes')
        quit()

print('No')

Submission status: Wrong Answer

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

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

print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

all_crane_num = x * 2
diff = y - all_crane_num

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

turtle_num = diff / 2
crane_num = x - turtle_num

if turtle_num >= 0 and crane_num >= 0 and turtle_num*4 + crane_num*2 == y:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if Y % 2 == 1:
    print("No")

    
result_list = []    
    
for a in range(X+1):
    result_list.append(2 * a + 4 * (X - a) == Y)
    
if any(result_list):
    print('Yes')
else:
    print('No')

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

Submission status: Wrong Answer

Solution code:
x,y = map(int, input().split())
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())

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

kame = X - turu

if turu > 0 and (4*kame + 2*turu == Y):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

if(X % 2 ==1):
    print("No")
    exit()
if(X*2 <= Y <= X * 4):
    print("Yes")
    exit()

print("No")

Submission status: Wrong Answer

Solution code:
temp = input().split(" ")

temp = [int(i) for i in temp]

x = temp[0]
y = temp[1]

flag = False

for i in range(1, 101):
    for j in range(1, 101):

        total = i + j
        foots = 2 * i + 4 * j

        if total == x and foots == y:
            print('Yes')
            flag = True

if not flag:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

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

x, y= na()


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

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
if (a[1] % 6 % 2 == 0) and (a[1] // 6 *2 + a[1] % 6 //2 == a[0]):
  print('Yes')
elif (a[1] % 2 == 0) and (a[1] //2 == a[0]):
  print('Yes')
elif (a[1] % 4 == 0) and (a[1] //4 == a[0]):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

    for i in range(0, x+1):
        for j in range(0, x+1):
            if i * 2 + j * 4 == y or i * 4 + j * 2 == y:
                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):
    # 足の数
    f = 2 * i + 4 * (x - i)
    if f == y:
        print('Yes')
        break
else:
    print('No')

Submission status: Wrong Answer

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

c = b - 2*a
d = c / 2

if(c==0 and d==0):
    print("Yes")

elif(a==(c+d)):
    print("Yes")

else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if X*2<=Y and Y<=X*4:
  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  <= y //2 :
    print('Yes')
  else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

y = (Y - X) / 2
x = (4 * X - Y) / 2
if type(y) == "int" and type(x) == "int":
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

eva=False

if Y%2==0:
    if 4*X>Y:
        if (2*X-Y/2)<=X:
            eva=True
if eva:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x,y=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())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,k=map(int,input().split())
f=0
for i in range(0,n,1):
  p=i*4+(n-i)*2
  if p==k:
    f=1
    break
if f==0:
  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 >= x*2:
  		print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

if x[0]*2 <= x[1] <= x[0]*4:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

ans="No"
for i in range(1,101):
    j=X-i
    if j>=1 and j<=100:
        if i*2 + j*4 == Y: ans="Yes"

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

crain = int((4 * x - y) / 2)

if crain > 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

answer= 'No'
for i in range(100):
  for j in range(100):
    if 2*i+ 4*j == y:
      answer= 'Yes'

print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    #n = int(input())
    #x = list(map( int, input().split()))
    x,y = map( int, input().split())
    turuka = (4*x-y)/2
    if turuka % 1 == 0 and turuka > 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:
    print('Yes')
else:   
    for i in range(x):
        ashi = 2 * i + 4 * (x-i)
        if ashi == y:
            print('Yes')
            break
    print('No')

Submission status: Wrong Answer

Solution code:
import sys


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

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

def  getAB(x,y):
  y=max(x,y)
  x=min(x,y)
  b=(y-2*x)/2
  a=x-b
  if a<=0 and b<=0:
    a,b=-a,-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())

if X != 1:
    for turu in range(1, X + 1, 1):
        kame = X - turu
        legs = kame * 4 + turu * 2
        if legs == Y:
            print("Yes")
            break
    else:
        print("No")
else:
    if Y % 2 == 0:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys 
from collections import deque
sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())
def LS(): return list(sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))

def main():
    x,y = IL()
    if 4*x<y or y%2!=0:
        print('No')
        exit()
    for i in range(x):
        if 4*i+2*(x-i)==y:
            print('Yes')
            exit()
    print('No')
    return

if __name__=='__main__':
    main()

Submission status: Wrong Answer

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

a = Y/4

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())
for i in range(1000):
    if 2*i==y-2*x:
        if i>x:
            print("NO")
            quit()
        else:
            print("YES")
            quit()
print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Z = Y - 2 * X

ans = "Yes" if (Z >= 0 and Z % 2 == 0 and Z <= X) else "No"
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print('No')

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
in_str = list(map(int,input().split()))
x = in_str[0]
y = in_str[1]

def check():
    for i in range(1, x + 1):
        if (y - (2 * i)) / 4 == x - i:
            return 'Yes'
    return 'No'

print(check())

Submission status: Wrong Answer

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

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