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

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

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
"""    Arnab Chanda    """

from collections import defaultdict, deque
from itertools import permutations
from sys import stdin,stdout
from bisect import bisect_left, bisect_right
from copy import deepcopy
import heapq

int_input=lambda : int(stdin.readline())
string_input=lambda : stdin.readline().split()
multi_int_input =lambda : map(int, stdin.readline().split())
multi_input = lambda : stdin.readline().split()
list_input=lambda : list(map(int,stdin.readline().split()))
string_list_input=lambda: list(string_input())
MOD = pow(10,9)+7

x, y = multi_int_input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

X, Y = map(int, input().split())
f = Y - 2*X
if f % 2 == 0:
    kame = f // 2
    if kame > X:
        print('No')
    else:
        print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X, Y = [int(v) for v in input().strip().split(" ")]
if (4 * X - Y) % 2 == 0 and (4 * X - Y) > 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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 = (int(i) for i in input().split())  

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
it = lambda: list(map(int, input().strip().split()))
INF = float('inf')

def solve():
    X, Y = it()
    if Y % 2:
        return False
    return 4 * X >= Y

if __name__ == '__main__':
    if not solve():
        print('No')
    else:
        print('Yes')

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

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

Submission status: Wrong Answer

Solution code:

import sys, io, os, re
import bisect
from pprint import pprint
from math import sin, cos, pi, radians, sqrt, floor
from copy import copy, deepcopy
from collections import deque
from fractions import gcd
from functools import reduce
from itertools import groupby

n1 = lambda: int(sys.stdin.readline().strip())
nn = lambda: list(map(int, sys.stdin.readline().strip().split()))
f1 = lambda: float(sys.stdin.readline().strip())
fn = lambda: list(map(float, sys.stdin.readline().strip().split()))
s1 = lambda: sys.stdin.readline().strip()
sn = lambda: list(sys.stdin.readline().strip().split())
nl = lambda n: [n1() for _ in range(n)]
fl = lambda n: [f1() for _ in range(n)]
sl = lambda n: [s1() for _ in range(n)]
nm = lambda n: [nn() for _ in range(n)]
fm = lambda n: [fn() for _ in range(n)]
sm = lambda n: [sn() for _ in range(n)]

def array1(n): return [0] * n
def array2(n, m): return [[0] * m for x in range(n)]
def array3(n, m, l): return [[[0] * l for y in xrange(m)] for x in xrange(n)]

X, Y = nn()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

X, Y = map(int, sys.stdin.readline().split())

for x in range(X+1):
    kame = x
    tsuru = X - x
    
    if kame*4+tsuru*2==Y:
        print("yes")
        break
else:
    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 or j*2 + i*4 == Y:
            flag = True

YesNo(flag)

Submission status: Wrong Answer

Solution code:
import sys, os, math, bisect, itertools, collections, heapq, queue
from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
from decimal import Decimal
from collections import defaultdict

# import fractions

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)
# lcm = lambda x, y: (x * y) // fractions.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    X, Y = il()
    for k in range(X + 1):
        for t in range(X + 1 - k):
            if 2*k + 4*t == Y:
                print('Yes')
                exit()
    else:
        print('No')


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

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

for i in range(X+1):
    p = i*2 + (X-1)*4
    if p == 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:
# fall 7, stand 8...
# !/ankit_SM/bin/env python

from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip

def main():
    tinn=1; #tinn=int(input())
    for tin in range(tinn):
        a,b=map(int,input().split())
        for i in range(a+1):
            for j in range(a+1):
                if(4*i+2*j==b and i+j==a):
                    print("YES")
                    return
        print("NO")

# region fastio
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)
class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
def print(*args, **kwargs):
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()
if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
# endregion
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

ans = Y - 2 * X
temp1 = ans / 2
temp2 = ans % 2

if temp2 == 0 and temp1 <= X:
  print("Yes")
else:
  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(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=map(int,input().split())
if y-2*x< 0 or y-2*x %2:
  print('No')
elif 4*x-y<0 or 4*x-y%2:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

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

low = 2*X
upper = 4*X

if low <= Y and Y <= upper:
    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")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
S=lambda:input()
I=lambda:int(input())
L=lambda:list(map(int,input().split()))
LS=lambda:list(map(str,input().split()))

def main():
    x,y=L()
    for i in range(x+1):
        if i*2==y:
            print('Yes')
            exit()
        for j in range(x+1-i):
            if i*2+j*4==y:
                print('Yes')
                exit()
    print('No')
            
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

for i in range(x):
  if asi==y:
    print("Yes")
    exit()
  asi+=2
  
print("No")

Submission status: Wrong Answer

Solution code:
#B
x,y = map(int,input().split())
flg = False
for i in range(101):
    a = i
    b = x - a
    if a * 2 + 4 * b == y:
        flg = True
        break
        
if flg:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys
from collections import deque
import copy
def main():
    x, y = map(int, input().split())
    count = 2 * x
    for i in range(x):
        if count == y:
            print('Yes')
            sys.exit()
        count += 2
    print('No')



if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
'''
Author : Shubhanshu Jain;
'''

import math
import random;
from collections import defaultdict 
mod =1000000007
r1 = lambda : int(input());
rm = lambda : map(int,input().split());
rms = lambda : map(str,input().split());
rls = lambda : list(rm())

def solve():
    a,l = rm();
    if(a*4>=l and a*2>=l and l%2==0):
        print("Yes");
    else:
        print("No")
        
        





def def_value(): 
	return "nan"
	
solve();

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
import math


#t = int(input())
tmp = input().split()
x,y = list(map(lambda a: int(a), tmp))
if(y<2*x):
	print("No")
	sys.exit()
if(y>4*x):
	print("No")
	sys.exit()

print("Yes")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin

def main():

    input = stdin.readline

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

    max_ashi = X * 4
    min_ashi = X * 2

    if (Y <= max_ashi) & (min_ashi <= Y) & (Y % 2 == 0):
        print("YES")
    else:
        print("NO")


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
foot=a[0]
ani=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:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
x, y = map(int, input().split())
if x * 4 < y:
    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 x in range(1,101):
    y = X-x
    if x*2 + y*4 == Y:
        print("Yes")
        break
else:
    print("No")

Submission status: Wrong Answer

Solution code:
n,m = map(int,input().split())
if 0 <= (m-2*n)//2 <= n:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

x, y = rm()
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 X * 4 > Y and Y % 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,101):
        if (i*2 + (X-i)*4) == Y:
            print("Yes")
            break
    else:
        print("No")

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

for i in range(a + 1):
  if i * 2 + (a - i) * 4 == b:
      print("YES")
      exit()

print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

import numpy as np

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

Submission status: Wrong Answer

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

if Y % 2 != 0:
    print("No")
    exit()

print("Yes")

Submission status: Wrong Answer

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

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+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())

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

if flag == False:
    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:
        print("Yes")
    else:
        print("No")
    return 0

if __name__ == "__main__":
    solve()

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

flag=0
for i in range(1,X+1):
    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())

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


if __name__ == '__main__':
    resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def solve():
    X, Y = map(int,input().split())
    
    for crane in range(X+1):
        for turtle in range(X+1):
            if crane + turtle > X:
                break

            if crane * 2 + turtle * 4 == Y:
                print('Yes')
                return
    else:
        print('No')
if __name__ == '__main__':
    solve()

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")
        quit()
print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
# debug = lambda *a, **kw: print(*a, **kw, file=sys.stderr)

x, y = inm()


def solve():
    if 4 * x - y < 0:
        return False
    if (4 * x - y) % 2 == 1:
        return False
    return True


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

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 > X*4 or Y < 2*X:
    print("No")
else:
    print("Yes")

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

Submission status: Wrong Answer

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

for i in range(1, X+1):
    turu = i
    kame = X - i

    if turu * 2 + kame * 4 == Y:
        print('Yes')
        exit()

print('No')

Submission status: Wrong Answer

Solution code:
import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

import numpy as np

x = na()
for i, xi in enumerate(x):
    if xi==0:
        print(i+1)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

if 4*X < Y or Y%2 != 0:
  ans = 'No'
else:
  ans = 'Yes'

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding:utf-8
x, y = map(int, input().split())

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

print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# fall 7, stand 8...
# !/ankit_SM/bin/env python

from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip

def main():
    tinn=1; #tinn=int(input())
    for tin in range(tinn):
        a,b=map(int,input().split())
        for i in range(a+1):
            for j in range(a+1):
                if(4*i+2*j==b):
                    print("YES")
                    return
        print("NO")

# region fastio
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0
    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None
    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()
    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()
    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)
class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
def print(*args, **kwargs):
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()
if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")
# endregion
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

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 <= Y / X <= 4])


if __name__ == '__main__':
    main()

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