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:
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect

def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    x, y = LI()
    kame = (y - (x * 2)) // 2
    turu = x - kame
    print(kame)
    print(turu)
    if kame >= 1 or turu >= 1:
        print('Yes')
    else:
        print('No')
    return


if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

var=Y-2*X
var2=var/2
if X>4*Y:
    print("No")
elif  var2.is_integer()==True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

var=Y-2*X
var2=var/2
if X>Y:
    print("No")

elif  var2.is_integer()==True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

    for n_cranes in range(X):
        n_turtles = X - n_cranes

        if n_cranes * 4 + n_turtles * 2 == Y:
            return 'Yes'

    return 'No'


def main():
    print(solve())


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

var=Y-2*X
var2=var/2
if  var2.is_integer()==True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

var=Y-2*X
var2=var/2
print(var2)
if  var2.is_integer()==True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
x,y = (int(x) for x in input().split())
k=(y-2*x)/2
if k.is_integer() and k>=1:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

var=Y-2*X
var2=var/21
print(var2)
if  var2.is_integer()==True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if Flag == True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

x = (4*b[0] - b[1])/2
y = (b[1] - 2*b[0])/2
if (x - int(x)) == 0 and (y - int(y)) == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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())
if y%2!=0:
    print("No")
kame=(y//2)-x
tsuru = x-kame
if (kame>=0)&(kame<=x)&(2*tsuru+4*kame==y):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X, Y = [int(x) for x in input().split()]
check = True
if X*4 <= Y:
    check = False
elif Y < 2*X:
    check = False
elif Y%2==1:
    check = False

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

Submission status: Wrong Answer

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

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

else:
    print('Yes')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
arr = input().split()

a = int(arr[0])
b = int(arr[1])

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

Submission status: Wrong Answer

Solution code:
arr = input().split()

a = int(arr[0])
b = int(arr[1])

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

Submission status: Wrong Answer

Solution code:
hiki,hon = map(int,input().split())
turu = 0
kame = 0

for i in range(50):
    if hiki > 0 and hon >= 4:
        hon = hon - 4
        kame = kame + 1
        hiki = hiki - 1
    elif hon == 2 and hiki == 1:
        hiki = 0
        hon = 0
    else:
        break

hantei = hon % 2

for i in range(50):
    if hiki == 0 or kame == 0 or hantei == 1:
        break
    elif hiki > 0 and kame > 1 and hantei == 0:
        hiki = hiki - 1
        kame = kame - 1

if hiki == 0 and hon == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
hiki,hon = map(int,input().split())
turu = 0
kame = 0

for i in range(50):
    if hiki > 0 and hon >= 4:
        hon = hon - 4
        kame = kame + 1
        hiki = hiki - 1
    else:
        break

hantei = hon % 2

for i in range(50):
    if hiki == 0 or kame == 0 or hantei == 1:
        break
    elif hiki > 0 and kame > 1 and hantei == 0:
        hiki = hiki - 1
        kame = kame - 1

if hiki == 0 and hon == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
Input = input().split()
X = Input[0]
X = int(X)
Y = Input[1]
Y = int(Y)

A = 0
for i in range(X):
    C = i + 1
    T = X - C
    CL = C * 2
    TL = T * 4
    L = CL + TL
    if L == Y:
        A += 1

if A == 0:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
import sys
from functools import reduce


def input():
    return sys.stdin.readline()[:-1]

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

bool1 = Y - 2*X >= 0
bool2 = 4*X - Y >= 0

if bool1 and bool2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

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

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

Submission status: Wrong Answer

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

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

print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input().split()
num = int(s[0])
total = int(s[1])
max_num = total//2
min_num = total//4

if total%2 ==1:
    print("No")
elif num <= max_num and min_num <= num:
    print("Yes")
else:
    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 * X)) / 2).is_integer() and ((Y - (4 * X)) / -2).is_integer():
  	print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

Solution code:
hiki,hon = map(int,input().split())

turu = 0
kame = 0

while(1):
    if hon < 4 or hiki == 0:
        break
    if hon >= 4:
        hon = hon -4
        kame = kame + 1
        hiki = hiki - 1
        
hantei = hon % 2
while(1):
    if hiki == 0 or kame == 0 or hantei == 1:
        break
    else:
        if hiki > 0 and kame > 0 and hantei == 0:
            hiki = hiki - 1
            kame = kame - 1
if hiki == 0 and hon == 0:
    print("Yes")
elif hiki == 1 and hon == 2:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

for x in range(1, X):
  if((2*x + 4*(X-x)) == Y and x > 0 and X-x > 0):
    print("Yes")
    exit()
print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
"""
    Satwik_Tiwari ;) .
    16 june , 2020  - Tuesday
"""

#===============================================================================================
#importing some useful libraries.
from __future__ import division, print_function

from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase


import bisect
from heapq import *
from math import *
from collections import deque
from collections import Counter as counter  # Counter(list)  return a dict with {key: count}
from itertools import combinations as comb # if a = [1,2,3] then print(list(comb(a,2))) -----> [(1, 2), (1, 3), (2, 3)]
from itertools import permutations as permutate
from bisect import bisect_left as bl
#If the element is already present in the list,
# the left most position where element has to be inserted is returned.
from bisect import bisect_right as br
from bisect import bisect
#If the element is already present in the list,
# the right most position where element has to be inserted is returned

#==============================================================================================

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):
    """Prints the values to a stream, or to sys.stdout by default."""
    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)

# inp = lambda: sys.stdin.readline().rstrip("\r\n")

#===============================================================================================
#some shortcuts

mod = 1000000007
def inp(): return sys.stdin.readline().rstrip("\r\n") #for fast input
def out(var): sys.stdout.write(str(var))  #for fast output, always take string
def lis(): return list(map(int, inp().split()))
def stringlis(): return list(map(str, inp().split()))
def sep(): return map(int, inp().split())
def strsep(): return map(str, inp().split())
def graph(vertex): return [[] for i in range(0,vertex+1)]
def zerolist(n): return [0]*n
def nextline(): out("\n")  #as stdout.write always print sring.
def testcase(t):
    for p in range(t):
        solve()
def printlist(a) :
    for p in range(0,len(a)):
        out(str(a[p]) + ' ')
def lcm(a,b): return (a*b)//gcd(a,b)
def power(a,b):
    ans = 1
    while(b>0):
        if(b%2==1):
            ans*=a
        a*=a
        b//=2
    return ans
def ncr(n,r): return factorial(n)//(factorial(r)*factorial(max(n-r,1)))
def isPrime(n) : # Check Prime Number or not
    if (n <= 1) : return False
    if (n <= 3) : return True
    if (n % 2 == 0 or n % 3 == 0) : return False
    i = 5
    while(i * i <= n) :
        if (n % i == 0 or n % (i + 2) == 0) :
            return False
        i = i + 6
    return True

#===============================================================================================
# code here ;))

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



testcase(1)
# testcase(int(inp()))

Submission status: Wrong Answer

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

max_leg = 4 * X
min_leg = 2 * X

if min_leg < Y < max_leg and Y % 2 == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
li = list(map(int, input().split()))
re = "Yes"
if li[0] * 2 < li[1]:
  re = "No"
elif li[0] % 2 == 0:
  if li[1] % 2 != 0:
    re = "No"
elif li[0] % 2 != 0:
  if li[1] % 2 == 0:
    re = "No"
print(re)

Submission status: Wrong Answer

Solution code:
S,leg = [int(i) for i in input().split()]
#2x + 4(S-x) = leg
#2x + 4S - 4x - leg = 0
#2x = 4S-leg
x = (4*S-leg)/2
if x-int(x) == 0 and x>=0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

def solve(X, Y):
    for k in range(X+1):
        for t in range(X-k+1):
            if k * 2 + t * 4 == Y:
                return "Yes"
    return "No"

print(solve(X, Y))

Submission status: Wrong Answer

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

def solve(X, Y):
    for k in range(X):
        for t in range(X-k):
            if k * 2 + t * 4 == Y:
                return "Yes"
    return "No"

print(solve(X, Y))

Submission status: Wrong Answer

Solution code:
S,leg = [int(i) for i in input().split()]
#2x + 4(S-x) = leg
#2x + 4S - 4x - leg = 0
#2x = 4S-leg
x = (4*S-leg)/2
if x == int(x) and x>0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a = x[0]*2 - x[1]/2
b = -x[0] + x[1]/2

if (a>=0 and b>= 0):
	if(a.is_integer() and b.is_integer()):
		print("yes")
	else:
		print("no")
else:
	print("no")

Submission status: Wrong Answer

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

a = x[0]*2 - x[1]/2
b = -x[0]/2 + x[1]/2

if a>=0 and b>= 0:
	if(isinstance(a, int) and isinstance(b, int)):
		print("yes")
	else:
		print("no")
else:
	print("no")

Submission status: Wrong Answer

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

a = x[0]*2 - x[1]/2
b = -x[0]/2 + x[1]/2

if a>=0 and b>= 0:
	if(isinstance(a, int) and isinstan(b, int)):
		print("yes")
	else:
		print("no")
else:
	print("no")

Submission status: Wrong Answer

Solution code:
n,l = map(int,input().split())
if l%2 != 0:
    print('NO')
elif l<=n*4:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:

#x+y = A
#2x+4y = B

A,B = map(int,input().split())

Y = (B - 2*A) / 2

if not(A or B) :
    print('No')
    exit(0)

if not( Y.is_integer() ) :
    print('No')
    exit(0)
else:
    X = A - Y
    if X < 0:
        print('No')
        exit(0)

print('Yes')

Submission status: Wrong Answer

Solution code:

#x+y = A
#2x+4y = B

A,B = map(int,input().split())

Y = (B - 2*A) / 2

if not( Y.is_integer() ) :
    print('No')
    exit(0)
else:
    X = A - Y
    if X < 0:
        print('No')
        exit(0)

print('Yes')

Submission status: Wrong Answer

Solution code:
B = [int(i) for i in input().split()]
s1 = 0
s2 = 0
if 1 <= B[0] <= 100:
    if B[1]%2 == 0 or B[1]%4 == 0:
        if B[0] >= B[1]/2:
            s1 = 1
        else:
            s1 = 0
        if B[0] >= B[1]/4:
            s2 = 1
        else:
            s2 = 0
    else:
        S = "No"
else:
    S = "choose number between 1 ans 100"
if s1 == 0 and s2 ==0:
    S = "No"
else:
    S = "Yes"
print(S)

Submission status: Wrong Answer

Solution code:
B = [int(i) for i in input().split()]
if B[1]%2 == 0 or B[1]%4 == 0 and 1 <= B[0] <= 100:
    if B[0] >= B[1]/2:
        S = "Yes"
    else:
        S = "No"
    if B[0] >= B[1]/4:
        S = "Yes"
    else:
        S = "No"
else:
  S = "No"
print(S)

Submission status: Wrong Answer

Solution code:
B = [int(i) for i in input().split()]
if B[1]%2 == 0 or B[1]%4 == 0 and 1 < B[0] <= 100:
    if B[0] >= B[1]/2:
        S = "Yes"
    else:
        S = "No"
    if B[0] >= B[1]/4:
        S = "Yes"
    else:
        S = "No"
else:
  S = "No"
print(S)

Submission status: Wrong Answer

Solution code:
B = [int(i) for i in input().split()]
if B[1]%2 == 0 or B[1]%4 == 0 and 1 < B[0] <= 100:
    if B[0] >= B[1]/2 or B[0] >= B[1]/4:
        S = "Yes"
    else:
        S = "No"
else:
  S = "No"
print(S)

Submission status: Wrong Answer

Solution code:
B = [int(i) for i in input().split()]

if B[1]%2 == 0 or B[1]%4 == 0:
    if B[0] >= B[1]/2 or B[0] >= B[1]/4:
        S = "Yes"
    else:
        S = "No"
else:
    S = "No"
print(S)

Submission status: Wrong Answer

Solution code:
import argparse
import collections
import logging.config
import sys
import csv
import numpy as np

def main():
    s=input().split(" ")
    si = []
    for d in s:
        si.append(int(d))
    ans = "no"
    for i in range(si[0]+1):
        if (si[1] == si[0]*4-2*i) : ans = "yes"
    print (ans)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import argparse
import collections
import logging.config
import sys
import csv
import numpy as np

def main():
    s=input().split(" ")
    si = []
    for d in s:
        si.append(int(d))
    print (si)
    ans = "no"
    for i in range(si[0]+1):
        if (si[1] == si[0]*4-2*i) : ans = "yes"
    print (ans)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def ip():
    return [ int(_) for _ in input().split()]

def test_4(ip,n):
    
    
    
    if ip[1]//n==ip[0]:
        
         return 1   
            
    else:
        return 0
    
        

def main():
    ip1=ip()
    co=0
    a=test_4(ip1,4)
    b=test_4(ip1,2)
    
    if a==0 and b==0:
        
        for i in range(ip1[0]):
            
            if (ip1[1]%2==0):
                       val=ip1[1]/2
                       ip1[1]=val
                       co+=1
                       
            elif(ip1[1]%4==0):
                val=ip1[1]/4
                ip1[1]=val
                co+=1
    elif a==1:
        print("Yes")
        return
    elif b==1:
        print("yes")
        return
        
    if co==ip1[0] and ip1[1]==1:
        print("Yes")
    else:
        print("No")





if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
def ip():
    return [ int(_) for _ in input().split()]

def main():
    ip1=ip()
    co=0
    for i in range(ip1[0]):
        if (ip1[1]%2==0):
                   val=ip1[1]/2
                   ip1[1]=val
                   co+=1
                   
        elif(ip1[1]%4==0):
            val=ip1[1]/4
            ip1[1]=val
            co+=1
    if co==ip1[0] and ip1[1]==1:
        print("Yes")
    else:
        print("No")





if __name__=='__main__':
    main()

Submission status: Wrong Answer

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

print("No")

Submission status: Wrong Answer

Solution code:
X,Y = map(int,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 == True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

flg = False

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

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
print(['NO', 'Yes'][y in [2*x+2*t for t in range(x+1)]])

Submission status: Wrong Answer

Solution code:
import sys
X, Y = list(map(int, sys.stdin.readline().rstrip().split(' ')))

y = (4*X-Y)/2
x = (Y-2*X)/2

if x > 0 and y > 0 and isinstance(x, int) and isinstance(y, int):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
import sys
X, Y = list(map(int, sys.stdin.readline().rstrip().split(' ')))

y = (4*X-Y)/2
x = (Y-2*X)/2

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print('No')

Submission status: Wrong Answer

Solution code:
m =[int(i) for i in input().split()]

t_2 = m[1]-2*m[0]

if (t_2 % 2 == 0 or t_2 ==0 ) & t_2>=0:
    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 X*4<=Y and X*2>=Y:
        print('Yes')
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
m =[int(i) for i in input().split()]

t_2 = m[1]-2*m[0]

if t_2 % 2 == 0 & t_2>=0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
X,Y = map(int, input().split())
if Y%2==1:
    print("No")
else:
    kame=Y//4
    Y=Y-(kame*4)
    turu=Y//2
    if (turu+kame)==X:
        print("Yes")
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
X,Y = map(int, input().split())
if Y%2==1:
    print("NO")
else:
    kame=Y//4
    Y-=(kame*4)
    turu=Y//2
    if (turu+kame)==X:
        print("Yes")
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
X,Y = map(int, input().split())
if Y%2==1:
    print("NO")
else:
    kame=Y//4
    Y=Y//4
    turu=Y//2
    if (turu+kame)==X:
        print("Yes")
    else:
        print('No')

Submission status: Wrong Answer

Solution code:
X,Y = map(int, input().split())
if Y%2==1:
    print("NO")
else:
    kame=Y//4
    Y=Y//4
    turu=Y//2
    if (turu+kame)==X:
        print("YES")
    else:
        print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for x in range(X+1):
    y = X - x
    if y * 2 + x * 4 == 0:
        ans += 1
    else:
        pass

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

Submission status: Wrong Answer

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

for x in range(X+1):
    for y in range(X-x):
        if x * 4 + y * 2 == Y:
            ans += 1
        else:
            pass

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

Submission status: Wrong Answer

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

for x in range(X+1):
    for y in range(X-x+1):
        if x * 4 + y * 2 == Y:
            ans += 1
        else:
            pass

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

Submission status: Wrong Answer

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

for x in range(X+1):
    for y in range(X-x+2):
        if x * 2 + y * 4 == Y:
            ans += 1
        else:
            pass

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

Submission status: Wrong Answer

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

for x in range(X+1):
    for y in range(X+1-x):
        if x * 2 + y * 4 == Y:
            ans += 1
        else:
            pass

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