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: Accepted

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

for i in range(101):
  for j in range(101):
    if i+j == x and 2*i+4*j == y:
      print ('Yes')
      exit()
print ('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X_hiki, Y_hon = map(int, input().split())

ans = 'No'

for i in range(X_hiki + 1):
    hon = 2 * i + 4 * (X_hiki - i)
    
    if (hon == Y_hon):
        ans = 'Yes'
        break

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X,Y = map(int,input().split())
flag =False
for k in range(101):
    for l in range(101):
        if k*2 + l*4 ==Y and X ==k+l:
            flag = True
            break
            
if flag == True:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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


def solve(X: int, Y: int):
    for i in range(0,X+1):
        if i*2 + 4*(X-i) == Y:
            print(YES)
            exit()
    print(NO)
    exit()
    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: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
a=input()
a0=a.split()
x=int(a0[0])
y=int(a0[1])
if y%2==1:
    print("No")
    sys.exit()
if y/2<x:
    print("No")
    sys.exit()
if y/4>x:
    print("No")
    sys.exit()
print("Yes")

Submission status: Accepted

Solution code:
A,B = list(map(int, input().split()))
if (B % 2) == 0:
    hi = A*4
    lo = A*2
    if B>=lo and B <= hi:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

Solution code:
X, Y = map(int, input().split())
a = 2 * X - Y // 2
b = Y // 2 - X
ans = 'Yes'
if a<0 or b<0 or Y%2==1:
  ans = 'No'
print(ans)

Submission status: Accepted

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


# 入力を整数に変換して受け取る
def input_int():
    return int(input())


# マイナス1した値を返却
def int1(x):
    return int(x) - 1


# 半角スペース区切り入力をIntに変換してMapで受け取る
def input_to_int_map():
    return map(int, input().split())


# 半角スペース区切り入力をIntに変換して受け取る
def input_to_int_tuple():
    return tuple(map(int, input().split()))


# 半角スペース区切り入力をIntに変換してマイナス1した値を受け取る
def input_to_int_tuple_minus1():
    return tuple(map(int1, input().split()))


def main():
    x, y = input_to_int_map()

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

        if ((kame * 4) + (turu * 2)) == y:
            return "Yes"

    return "No"


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

Submission status: Accepted

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

val=Y-2*X

if val%2==0:
    y=val//2
    if y>X:
        print("No")
        exit()
    if val>=0:
        print("Yes")
        exit()

print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

main()

Submission status: Accepted

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

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))

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


def main():
    X, Y = MAP()

    l = [i for i in range(2*X, 4*X + 2, 2)]
    print('Yes' if Y in l else 'No')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print('No')

Submission status: Accepted

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

at = XY[0] * 4
ac = XY[0] * 2

if (at < XY[1] or ac > XY[1]):
    print("No")
    exit()
if (XY[1] % 2 == 1):
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import math
import heapq
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def FLIST(n):
    res = [1]
    for i in range(1, n+1): res.append(res[i-1]*i%DVSR)
    return res

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
def main():
    X, Y = (int(i) for i in input().split())
    for i in range(X+1):
        asi = i*2 + (X-i)*4
        if asi == Y:
            return print("Yes")
    print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

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


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

print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

f = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

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

flag = False

for i in range(x+1):
    tsuru = i
    kame = x - i
    if 2 * tsuru + 4 * kame == y:
        flag = True
        break

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    import sys
    sys.setrecursionlimit(10**9)
    input = sys.stdin.readline

    X, Y = map(int, input().split())
    crane = 0
    turtle = X * 4
    for i in range(X+1):
        if crane + turtle == Y:
            print("Yes")
            return
        crane += 2
        turtle -= 4
    
    print("No")
    return

main()

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline
#sys.setrecursionlimit(10**8)


def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    x, y = geta(int)

    m2, n2 = y - 2 * x, 4 * x - y

    if m2 & 1 == 0 and n2 & 1 == 0 and m2 >= 0 and n2 >= 0:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
import functools
import operator
import sys 

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

for x in range(X + 1):
    # turu: x
    # kame: (X - x)

    val = 2 * x + 4 * (X - x)
    

    if val == Y:
        print('Yes')

        sys.exit()

print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)

#a = int(input())
#b = list(map(int, input().split()))
x, y = map(int, input().split())
#s = input()
#s,t = input().split()
#
#readline = sys.stdin.readline
#n,m = [int(i) for i in readline().split()]
#ab = [[int(i) for i in readline().split()] for _ in range(n)]

#a+b=x
#2*a+4*b=y
#2*a+2*b=2*x

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

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

Submission status: Accepted

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

x = 2.0*X - Y/2.0
y = Y/2.0 - X

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    X, Y = map(int, input().split())
    if Y%2:
        return 'No'
    Y //= 2
    if X <= Y <= 2*X:
        return 'Yes'
    else:
        return 'No'

print(main())

Submission status: Accepted

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

for a in range(101):
    for b in range(101):
        if a+b == X and 2*a+4*b == Y:
            f = True
            break

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

Submission status: Accepted

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

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

print("No")

Submission status: Accepted

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


check = 0
for i in range(101):
    for j in range(101):
        if (i * 2 + j * 4 == y) and i + j == x:
            check = 1
if check == 1:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

print("No")

Submission status: Accepted

Solution code:
N, L = map(int, input().split())
res = "No"
for i in range(N+1):
  chall = 2*i + 4 * (N-i)
  if chall == L:
    res = "Yes"
  else:
    pass
print(res)

Submission status: Accepted

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

Submission status: Accepted

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

count = 0

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

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

Submission status: Accepted

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

if (Y - 2 * X) % 2 > 0:
    print('No')
    exit()

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

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

Submission status: Accepted

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

answer = "No"
for i in range(X + 1):
    tsuru = i
    kame = X - i
    if tsuru * 2 + kame * 4 == Y:
        answer = "Yes"
        break

print(answer)

Submission status: Accepted

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

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

c = (4 * X - Y) // 2
t = X - c

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

Submission status: Accepted

Solution code:

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

flag=0
for i in range(X+1):
    j = X - i
    if 2*i + 4*j ==Y:
        flag=1
        break

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

Submission status: Accepted

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

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

print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from typing import Dict, List, Optional, Tuple, Union  # noqa: F401


def main(X, Y):
    ans = False
    for a in range(X + 1):
        if 2 * a + 4 * (X - a) == Y:
            ans = True
            break
    print(["No", "Yes"][ans])


if __name__ == "__main__":
    X, Y = map(int, input().split())
    main(X, Y)

Submission status: Accepted

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

Submission status: Accepted

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

if y%2==0 and x*2<=y<=x*4:
    ans="Yes"

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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


def solve(X: int, Y: int):
    if Y % 2 == 0 and Y / 2 - X >= 0 and 2 * X - Y / 2 >= 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: Accepted

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

a = (4*X-Y)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x,y = [int(i) for i in input().split()]
if y%2 == 1:
    print("No")
elif y < 2*x or y > 4*x:
    print("No")
else:
    b = int((y - 2*x)/2)
    a = x - b
    if a >= 0 and b >= 0:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
import sys

# print('input >>')
X, Y = map(int,(input().split()))

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

print('No')
# print('-----output-----')

Submission status: Accepted

Solution code:
def main(X, Y):
    cand = Y // 4
    for i in range(cand, -1, -1):
        if i * 4 + (X - i) * 2 == Y:
            print('Yes')
            exit()
    else:
        print('No')
if __name__ == '__main__':
    X, Y = list(map(int, input().split()))
    main(X, Y)

Submission status: Accepted

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

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

print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

if __name__ == "__main__":
    X, Y = [int(x) for x in input().split(" ")]
    # i tul
    for i in range(0, X + 1):
        if i * 2 + (X - i) * 4 == Y:
            print("Yes")
            sys.exit(0)
    print("No")

Submission status: Accepted

Solution code:
import sys
from math import factorial
from collections import Counter
from fractions import Fraction
import heapq, bisect, fractions
import math
import itertools
sys.setrecursionlimit(10 ** 5 + 10)
INF = 10**15 +5
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()))
MOD = 10**9 + 7

x, y = MAP()
if y%2 ==1:
    print('No')
    sys.exit()
a = 2*x-(y//2)
b = -x + (y//2)
if a >=0 and b>=0:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
def main():

    x,y = tuple([int(t)for t in input().split()])

    b = y-2*x
    if b<0:
        print("No")
        return
    if b%2==1:
        print("No")
        return
    b //= 2

    if x-b<0:
        print("No")
        return
    print("Yes")
    

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

print ('No')

Submission status: Accepted

Solution code:
def solve():
    for a in range(X+1):
        if 2 * a + 4 * (X - a) == Y:
            print('Yes')
            return
    print('No')
if __name__ == "__main__":
    X, Y = map(int, input().split())
    solve()

Submission status: Accepted

Solution code:
x, y = [int(i) for i in input().split()]
if y % 2 == 0:
    if x*2 <= y <= x*4:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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


if __name__ == "__main__":
    slove()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import fractions
import collections
import itertools
X,Y=map(int,input().split())
kame=(Y-2*X)/2
tsuru=X-kame
if (kame>=0)and(kame.is_integer()==True)and(tsuru>=0):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

def ans(X, Y):
    TT = Y - 2*X
    if TT < 0:
        return "No"
    if TT % 2 != 0:
        return "No"
    T = TT // 2
    C = X - T
    if C < 0:
        return "No"
    return "Yes"
    
X, Y = input().split(' ')
X = int(X)
Y = int(Y)

print(ans(X, Y))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

print('No')

Submission status: Accepted

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

k = (Y-2*X)/2
t = X - k
if k >= 0 and t >= 0 and k == int(k) and t == int(t):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

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

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

    ashi = turu * 2 + kame * 4
    if ashi == Y:
        print('Yes')
        quit()
print('No')

Submission status: Accepted

Solution code:
# import numpy as np
# import math
# import copy
# from collections import deque
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(10000)


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

    res = 'No'

    for turu in range(X+1):
        kame = X - turu
        test = turu * 2 + kame * 4
        if test == Y:
            res = 'Yes'
            break

    print(res)



main()