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 = list(map(float, input().split()))

a = Y - 2 * X

if a >= 0 and a % 2 == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

c = Y / 2 - X
t = X - c

if (c < 0 or t < 0 or c != math.floor(c) or t != math.floor(t)):
    print("NO")
else:
    print("YES")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

found = False
# if (X == 1) :
#     if (Y == 2 or Y == 4) :
#         found = True

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

input = sys.stdin.readline


def main():
    X,Y = list(map(int, input().split(" ")))

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



if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

asi = y - x * 2
kame = asi / 2
turu = x - kame

if kame >= 0 and turu >= 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
else:
    print('No')

Submission status: Wrong Answer

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

if(X==1):
  if(Y==2 or Y==4):
    print("Yes")
  else:
    print("No")
else:
  if(Y % X==2 or Y % X==4):
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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

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

else:
    print("No")

Submission status: Wrong Answer

Solution code:
X, Y = [int(x) for x in input().split()]
t = Y - 2 * X
if (0 <= t <= 4*X):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

for i in range(X):
    bX = X - (i+1)
    bY = Y - 2 * (i+1)
    if 4 * bX == bY:
        P = "Yes"
        
print(P)

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())
        if(b%2==0 and b//4<=a):
            print("YES")
        else:
            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 = "No"
for i in range(201):
    if Y == i * 2 + (X - i) * 4:
        ans = "Yes"

print(ans)

Submission status: Wrong Answer

Solution code:
N, M = map(int,input().split())

crain = (4 * N - M) / 2
if isinstance(crain, int) and crain > 0:
    crain = int(crain)
    print("Yes")
else:
    print('No')

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())#X匹、Y本の足
a = 0#つる
b = X - a#かめ
for i in range(X+1):
  a = i
  b = X - a
  if a * 2 + b * 4 == Y:
    print("YES")
  elif b == 0:
    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()

print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
import numpy as np

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(X: int, Y: int):
    a = (4*X-Y)//2
    if a>=0:
        print(YES)
    else:
        print(NO)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    Y = int(next(tokens))  # type: int
    solve(X, Y)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 0
for i in range(1,x+1):
    if y == 2*i+4*(x-i):
        ans += 1
        break
    else:
        continue

if ans >= 1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
def main():
    x,y = map(int, input().split())
    a="No"
    if y%2 == 1:
        a="No"
    elif x == 1:
        if y==4 or y==2:
            a="Yes"
    else:
        for i in range(1,x+1):
            for j in range(i+1,x+1):
                if 2*i+4*j == y or 4*i+2*j==y:
                    a="Yes"
    print(a)
main()

Submission status: Wrong Answer

Solution code:
X , Y = map(int, input().split())
val = X * 2
for i in range(X + 1):
    val += i * 2
    if val == Y:
        print('YES')
        break
else:
    print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
  x, y =  map(int,input().split())
  fm1 = y - 2 * x
  fm2 = 4 * x - y
  if y % 2 == 0 and fm1 >= 0 and fm2 >= 0:
    print("YES")
  else:
    print("NO")


if __name__ == '__main__':
  main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

main()

Submission status: Wrong Answer

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

if y-2*x <0 or 2*x-y/2<0:
  print("No")
  sys.exit()
if y%2==1 :
  sys.exit()
print("Yes")

Submission status: Wrong Answer

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

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 == 0 and (4*x-y)/2%1 == 0:
		print('Yes')
else:
	print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(x):
  if y>2:
    y-=4
    
  else:
    y-=2
    
  if y==0:
    print("Yes")
    sys.exit()
      
print("No")

Submission status: Wrong Answer

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

for i in range(x):
    y==2*i+4*(x-i)

    
if(y==2*i+4*(x-i)):
    print('Yes')
elif(x==1 and (y==2 or y==4)):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

val = Y - 2*X
if((val % 2) == 0) and (val <= 2*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-i+1):
        print(i,j)
        if 2*i+4*(X-i)==Y:
            print('Yes')
            exit(0)

print('No')

Submission status: Wrong Answer

Solution code:
def main1():
    A,B=map(int,input().split())
    if A-2*B >=2 or  4*A-B >=2:
        print("Yes")
    else:
        print("No")
    
main1()

Submission status: Wrong Answer

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

ans = "No"

for i in range(0,X + 1):
  for j in range(X - i,i):
    if i * 2 + j * 4 == Y:
      ans = "Yes"
      break
      
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N , M = (map(int , input().split()))
if M % 2 != 0:
    print("No")
elif (M % 4 == 0 or M % 4 == 2) and M <= (N*4):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split()) 
num=a*4
while 1:
    if num==b:
        print("Yes")
        exit()
        
    elif num<b:
        break
    num=num-2        
    
print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

if ans>=1:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if Y - 2 * X >= 0 and 4 * X - Y >= 0 and (Y - 2 * X) % 2 == 0 and (4 * X - Y) % 2 == 0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
X ,Y = map(int,input().split())
for i in range(0, X+1):
  print(i)
  print(X-i)
  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())
flg=False
for i in range(1,X+1):
    for j in range(X+1-i):
        if i*2+j*4 == Y or j*2+i*4 == Y:
            print("Yes")
            flg=True
            break
    if flg:
        break

if flg==False:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

a = 2*x-y/2
b = -x + y/2

if y%2 != 0 or (a <= 0 or b <= 0):
  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 = map(int, input().split())

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

Submission status: Wrong Answer

Solution code:
import sys

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

#鶴a匹、亀x-a匹とする
for a in range(1, x + 1):
  if y == 4 * x - 2 * a:
    print('YES')
    sys.exit()
    
print('NO')

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
X,Y = map(int, input().split())

i=1
while i<=X:
    KAME=X-i
    TURU=i
    if (KAME*4)+(TURU*2)==Y:
        print("Yes")
        quit()
    i+=1
    
print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if Y % 2 != 0:
  print("NO")
else:
  if Y >= 2*X:
    print("YES")
  else:
    print("NO")

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
import numpy as np

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(X: int, Y: int):
    a = (4*X-Y)//2
    if a>0:
        print(YES)
    else:
        print(NO)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    Y = int(next(tokens))  # type: int
    solve(X, Y)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
L = [int(i) for i in input().split()]
flag=0
for i in range(L[0]):
    if L[1]-i*4-(L[0]-i)*2==0:
        print("Yes")
        flag=1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

for i in range(X):
  x2 = i
  x4 = X - i
  if (int(x2*2+x4*4) == Y):
    print('Yes')
    sys.exit()

print('No')

Submission status: Wrong Answer

Solution code:
from collections import defaultdict,deque
from sys import stdin,setrecursionlimit
import heapq,bisect,math,itertools,string,queue,datetime,copy
setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, stdin.readline().split()))

x,y = inpl()

xx = (4*x-y)*(1/2)
yy = (y-2*x)*(1/2)

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

Submission status: Wrong Answer

Solution code:
import math
X,Y=map(int,input().split())
#B,W=map(int,input().split())
#N=int(input())

flag=False

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

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

Submission status: Wrong Answer

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

if x*4-1 <= y or x*2-1 >= y:
    print('No')
elif y % 2 == 1:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

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

pnt = 0
for i in range(1,x+1):
    if i * 2 + (x-i) * 4 == y:
        pnt = 1

if pnt == 0:
    print("No")
if pnt == 1:
    print("Yes")

Submission status: Wrong Answer

Solution code:
x, y = list(map(int, input().split()))
# ab_sorted = sorted(ab, key=lambda x: x[0])
#ab = [list(map(int, input().split())) for i in range(n)]
# print(min(15*n, 100*(n//10+1), 100*(n//10)+15*(n % 10)))

# xひき　y本
total = 0
if y % 2 != 0:
    print("No")
    exit()
else:
    for i in range(0, x+1):
        total = 2*i + 3*(x-i)
        if total == y:
            print("Yes")
            exit()
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A, B = (int(s) for s in input().rstrip().split())

if ((B - 2 * A) >= 2 or (4 * A - B) >= 2) and (B - 2 * A) >= 0 and (4 * A - B) >= 0 and (B - 2 * A) % 2 == 0 and (4 * A - B) % 2 == 0:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin
input = stdin.readline

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:
# 整数の入力

# スペース区切りの整数の入力
X, Y = map(int, input().split())


def myfunc(X, Y):
    for tsuru in range(101):
        turtle = X - tsuru
        legs = turtle * 4 + tsuru * 2

        if legs == Y:
            return "Yes"

    return "No"

print(myfunc(X,Y))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

x, y = MI()
if y % 2 == 1:
    print("No")
    sys.exit()
y = y // 2
if y > x * 2 and y < x:
    print("No")
    sys.exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
X, Y = 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:
X,Y = 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())
exist_flg = False
for kame in range(a):
  tsuru = a - kame
  if (kame*4+tsuru*2)==b:
    exist_flg = True
    break
if exist_flg:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
[X, Y] = list(map(int, input().split()))
C = 0
T = 0
A = []
for C in range(X+1):
  for T in range(X+1-C):
    if 2*C + 4*T == Y:
      A = [C, T]
    else:
      continue
if bool(A) == True:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

for i in range(X):
    bX = X - (i+1)
    bY = Y - 2 * (i+1)
    if 4 * bX == bY:
        P = "YES"
        
print(P)

Submission status: Wrong Answer

Solution code:
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

X, Y = MAP()

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

# すべて亀
legs = 4 * x

if legs == y:
    print("Yes")
    exit()

if legs < y or y % 2 == 1:
    print("No")
    exit()

# 亀を鶴に置き換えていく
for i in range(x):
    legs -= 2
    if legs == y:
        print("Yes")
        exit()

Submission status: Wrong Answer

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

for i in range(X):
    if 4 * i + 2 * (X - i) == Y:
        print('Yes')
        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) // 2 >= 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

for i in range(26):
  if y == 2 * (x + i):
    print('Yes')

Submission status: Wrong Answer

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

b = y - 2 * x
a = x - b

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

y = (X + Y) / 2
if type(y) == "int":
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

print('NO')

Submission status: Wrong Answer

Solution code:
''''atcoder beginner contest-170'''

import math
from collections import defaultdict
def r():
    return int(input())
def rm():
    return map(int,input().split())
def rl():
    return list(map(int,input().split()))

'''B'''
a,b=rm()
res=False
for i in range(1,a+1):
    t=a-i
    if b==i*2+t*4:
        res=True
        break
if res:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
ans = "NO"
for n in range(X+1):
    if 4*X-2*n == Y:
        ans = "YES"
        break
print(ans)

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

Submission status: Wrong Answer

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