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(int, input().split()))

if y % 2 != 0:
    print('No')
    exit(0)

a = x * 4

if a < y:
    print('No')
    exit(0)

if y == 0:
    print('No')
    exit(0)
    
if x == y:
    print('No')
    exit(0)
    
print('Yes')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if y%2 != 0:
    print("No")
    sys.exit()

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

print("No")

Submission status: Wrong Answer

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

x = 0
T = 4 * X - Y
while True:
    if T == 2 * x:
        print('Yes')
        exit()
    if T < 2 * x:
        print('No')
        exit()
    x += 1

Submission status: Wrong Answer

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

def flag():
    if Y % 2 != 0:
        return False
    
    for i in range(X): #単調増加
        kame_num = i
        turu_num = X - i
        temp_sum = turu_num * turu + kame_num * kame
        if temp_sum == Y:
            return True
        elif temp_sum > Y:
            break
    return False

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

Submission status: Wrong Answer

Solution code:
num, legs = map(int, input().split())
BIRD = 2
TURTLE = 4

bird_lst = [BIRD * n for n in range(num)]
print(bird_lst)
turtle_lst = [TURTLE * n for n in range(num)]
turtle_lst.sort(reverse=True)
print(turtle_lst)

legs_lst = [b + t for b, t in zip(bird_lst, turtle_lst)]
print(legs_lst)

if legs in legs_lst:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
# template by 3xC and starkizard.
# contributors: 

#####################################################################################
from __future__ import division, print_function 

import sys
import os
from collections import Counter, deque, defaultdict
import itertools
import math
import io


"""Uncomment modules according to your need"""


# from bisect import bisect_left, bisect_right, insort
# from heapq import heappop, heapify, heappush
# from random import randint as rn
# from Queue import Queue as Q
# from copy import deepcopy
# from decimal import *
# import re
# import operator

#####################################################################################
# this enables you to write python3 code with PyPy2 (Python 2)
if sys.version_info[0] < 3:
    input = raw_input
    range = xrange

    filter = itertools.ifilter
    map = itertools.imap
    zip = itertools.izip

#####################################################################################

"""value of mod"""
MOD = 998244353
mod = 10**9 + 7

"""Uncomment next 4 lines if doing huge recursion"""
# import threading
# threading.stack_size(1<<27)
# sys.setrecursionlimit(10000

def prepare_factorial(mod=mod):
    """ returns two lists, factorial and inverse factorial modulo argument by default 10**9 +7 """
    # Comment code out when you don't need inverse factorial or vice versa
    fact = [1]
    for i in range(1, 200005):
        fact.append((fact[-1] * i) % mod)

    ifact = [0] * 200005
    ifact[200004] = pow(fact[200004], mod - 2, mod)
    for i in range(200004, 0, -1):
        ifact[i - 1] = (i * ifact[i]) % mod

    return fact, ifact

def modinv(n, p):
    """ returns N inverse modulo p """
    return pow(n, p - 2, p)

def ncr(n, r,  fact, ifact):
    """ takes 4 arguments: n , r and factorial and inverse factorial lists"""
    t = (fact[n] * (ifact[r]*ifact[n-r]) % MOD)% MOD
    return t


def get_n(Sum):    
    """this function returns the maximum n for which Summation(n) <= Sum"""
    ans = (-1 + sqrt(1 + 8*Sum))//2
    return ans

def sieve(n):
    """ returns a list of prime numbers till n """
    if n < 2: return list()
    prime = [True for _ in range(n + 1)]
    p = 3
    while p * p <= n:
        if prime[p]:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 2
    r = [2]
    for p in range(3, n + 1, 2):
        if prime[p]:
            r.append(p)
    return r



def divs(n, start=1):
    """ returns a list of all divisors till n """
    divisors = []
    for i in range(start, int(math.sqrt(n) + 1)):
        if n % i == 0:
            if n / i == i:
                divisors.append(i)
            else:
                divisors.extend([i, n // i])
    return divisors



def divn(n, primes):
    """ returns the number of divisors, two arguments n and the sieve till n """
    divs_number = 1
    for i in primes:
        if n == 1:
            return divs_number
        t = 1
        while n % i == 0:
            t += 1
            n //= i
        divs_number *= t



def lrfind(d, x, default=-1):
    """ Takes 2 arguments an iterable and an element. returns a tuple (firstoccurence,lastoccurence) -1 if not found """
    left = right = -1
    for i in range(len(d)):
        if d[i] == x:
            if left == -1: left = i
            right = i
    if left == -1:
        return default, default
    else:
        return left, right

def gcd(x, y): # math.gcd is slower
    """ returns greatest common divisor of x and y """
    while y:
        x, y = y, x % y
    return x

def check_sorted(a):
    ''' returns True/False '''
    for i in range(len(a)-1):
        if a[i]>a[i+1]:
            return False
    return True
def ceil(n, k=1): return n // k + (n % k != 0) #returns math.ceil but protecting against floating inconsistencies
def input(): return sys.stdin.readline().strip()
def ii(): return int(input()) #inputs integer
def mi(): return map(int, input().split()) # inputting space seperated variables for example x,y,z
def li(): return list(map(int, input().split())) #inputting a space seperated list of integers
def lw(): return input().split() #inputting a space seperated list of strings
def lcm(a, b): return abs(a * b) // gcd(a, b) #returns LCM of two arguments
def prr(a, sep=' ', end='\n'): print(sep.join(map(str, a)), end=end) #For printing an iterable with seperator sep as optional second argument (default : " "), ending character (default: "\n") as optional third
def dd(): return defaultdict(int) #returns a dictionary with values defaulted to 0
def ddl(): return defaultdict(list) #returns a dictionary with values defaulted to []
def write(s): return sys.stdout.write(s)












###################################################################
def main():
    #CODE GOES HERE:
    x,y=mi()
    if (y//2<x):
        print("No")
        return
    if (y/2==x):
        print("Yes")
        return
    
    if(y/4 >x):
        print("No")
        return

    if(y/4==x):
        print("Yes")
        return
    
    print("yes")

        











































""" -------- Python 2 and 3 footer by Pajenegod and c1729 ---------"""

py2 = round(0.5)
if py2:
    from future_builtins import ascii, filter, hex, map, oct, zip
    range = xrange

import os, sys
from io import IOBase, BytesIO

BUFSIZE = 8192

class FastIO(BytesIO):
    newlines = 0

    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None

    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
        return s

    def read(self):
        while self._fill(): pass
        return super(FastIO, self).read()

    def readline(self):
        while self.newlines == 0:
            s = self._fill();
            self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)


class IOWrapper(IOBase):

    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            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')


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip('\r\n')
# sys.stdin = open('input.txt', 'r')
# sys.stdout = open('output.txt', 'w')

""" main function"""

if __name__ == '__main__':
    main()
    # threading.Thread(target=main).start()

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

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

Submission status: Wrong Answer

Solution code:
n, m = map(int, input().split())

for i in range(1, n+1):
    f = 2 * i + 4 * (n - i)
    if f == m:
        print('Yes')
        break
    
else:
    print('No')

Submission status: Wrong Answer

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

n = (X*4 - Y) / 2

if n >=0 and n.is_integer() and n <= Y:
    print("Yes")
else:
    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 t!=0 and 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())
if (Y%2 == 1):
    print("No")
elif (Y > 4*X):
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
X,Y = map(int,input().split())
if Y/X <= 5:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
animal, leg = map(int, input().split())

answer = 'No'

for i in range(0, animal+1):
    temp = 2 * i + 4 * (animal-i)
    if temp == leg:
        answer = 'YES'
        break

print(answer)

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
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 > (4*X):
    print('NO')

elif Y < (2*X):
    print('NO')

elif Y % 2 != 0:
    print('NO')

else:
    print('YES')

Submission status: Wrong Answer

Solution code:
import sys
import math

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

flag = 0

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

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

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

Submission status: Wrong Answer

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

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

ans = ((4 * X) - Y) % 2

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

Submission status: Wrong Answer

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

n = y / 2 - x
m = x - n

if m >= 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

asi = 0
temp = 0

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

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



print("No")

Submission status: Wrong Answer

Solution code:
x = list(map(lambda x:int(x), input().split()))
X = x[0]
Y = x[1]

kame = (Y-X*2)//2
print(kame)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

tsuru = (4 * x - y) / 2
kame = x - tsuru

if tsuru >= 0 and kame >= 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

all_crane_num = x * 2
diff = y - all_crane_num
turtle_num = diff / 2
crane_num = x - turtle_num

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

Submission status: Wrong Answer

Solution code:

def main():
	x, y = map(int, input().split())
	for a in range(x):
		if y == a * 2 + 4 * (x - a):
			print('yes')
			return
		elif (y == x * 2) or (y == y*4):
			print('yes')
			return

	print('no')
	return

if __name__ == "__main__":
	main()

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# coding: utf-8

############################

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

for i in range(x):
    kame = x-i
    turu = i

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

print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
def ip():return int(input())
def imp():return map(int,input().split())
def impstr():return map(str,input().split())
def limp():return list(map(int,input().split()))
def limpstr():return list(map(str,input().split()))

a,b=imp()
for i in range(0,a+1):
    if i*2+(a-i)*3==b:
        print("Yes")
        exit()
print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

crane = [x for x in range(X+1)]
turtle = [x for x in range(X+1)]

for c in crane:
    for t in turtle:
        if c*2 + t*4 == Y:
            print("Yes")
            sys.exit(0)
            
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

print('Yes' if flag else 'No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

tm = (4*x) - y

for i in range(x):
    tm -= 2
    if tm == 0:
        print("Yes")
        exit()

print("No")

Submission status: Wrong Answer

Solution code:
from math import *
from copy import *
from string import *				# alpha = ascii_lowercase
from random import *
from sys import stdin,stdout
from sys import maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *
from collections import Counter		# d = dict(Counter(l))
import math
import math
import time
from queue import Queue
# PradeepGhosh_2017076

def seive(n):
	l=[True]
	l=l*(n+1)
	for i in range(2,int(sqrt(n))+1):
		if(l[i]==True):
			val=i*i
			while(val<len(l)):
				l[val]=False
				val+=i
	prime=[]
	for i in range(2,len(l)):
		if(l[i]==True):
			prime.append(i)
	return prime

def dp(l,i,n,val,ans):
	if(i>=n or val<0):
		return 1000000
	elif(val==0):
		return 0
	else:
		if(ans[i]==1000000):
			ans[i]=min(min(1+dp(l,i+1,n,val-l[i],ans),1+dp(l,i,n,val-l[i],ans)),dp(l,i+1,n,val,ans))
		return ans[i]
from queue import Queue
def factors(n):
	l=[]
	for i in range(1,int(sqrt(n))+1):
		if(n%i==0):
			if(n//i==i):
				l.append(i)
			else:
				l.append(i)
				l.append(n//i)
	return l
if __name__ == '__main__':
	x,y=map(int,input().split(" "))
	ans=-1
	for i in range(x+1):
		for j in range(x+1):
			if(i*4+j*2==y):
				ans=1
				break
		if(ans==1):
			break
	if(ans==1):
		print("Yes")
	else:
		print("No")

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*2-(L[0]-i)*4==0:
        print("Yes")
        flag=1
        break

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Z = Y - 2 * X

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

Submission status: Wrong Answer

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

import sys
import math


debug = False

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

def parse_input(lines_as_string = None):

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

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

    return (x, y)


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


    return result    


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

if __name__ == '__main__':

    main()

Submission status: Wrong Answer

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

else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np

# 実行環境(0:vscode, 1:atcoder)
MODE = 1

# 入力の次元
DIMENSION = 1

# int型に変換
INT_TYPE = 1

if not (MODE):
    with open("input.txt", "r") as f:
        s = f.read()
else:
    s = sys.stdin.read()

if DIMENSION == 0:
    if INT_TYPE == 1:
        s = int(s)
elif DIMENSION == 1:
    if INT_TYPE == 0:
        s = s.split()
    elif INT_TYPE == 1:
        s = [int(x) for x in s.split()]
elif DIMENSION == 2:
    if INT_TYPE == 0:
        s = [x.split() for x in s.splitlines()]
    elif INT_TYPE == 1:
        s = [[int(y) for y in x.split()] for x in s.splitlines()]

x, y = s
a = y - 2 * x
b = 4 * x - y
if a % 2 == 0 and b % 2 == 0 and a >= 0 and b >= 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 2*i + 4*(x-i) == y:
        ans = "Yes"
        break

print(ans)

Submission status: Wrong Answer

Solution code:
A,B=map(int,input().split())
if A*4<B:
  print("No")
else:
  if (A-((4*A-B)//2))*4+(4*A-B)==B:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
input1 = list(map(int, input().split()))
X = input1[0]
Y = input1[1]

judge = False
if (Y % 2 == 0 and 2*X - (Y/2) >= 0 ):
    judge = True

print("Yes" if judge == True else "No")

Submission status: Wrong Answer

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

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

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

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

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")
    break
  elif b == 0:
    print("NO")

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 == 0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

Solution code:

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


if y>=2*x and y<=4*x and y%2 ==0:
    ans ="YES"
else:
    ans = "NO"
print(ans)

Submission status: Wrong Answer

Solution code:
XY = list(map(int, input().split()))
 
if 2 * XY[0] - XY[1] / 2 >= 0 and -XY[0] + XY[1] / 2 >= 0:
  print('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())
if y%2==1:
	print("No")
	exit()
if y%4==0:
	if y<=x*4:
		print("Yes")
	else:
		print("No")
else:
	if y<=2+(x-1)*4:
		print("Yes")
	else:
		print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

t = (y - 2*x)

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

# y = 4*t + 2*(x - t)
# y = 2*t + 2 *x
# t = (y - 2*x)//2
# t >= 0 and t integer

# x = t + c

# y = 4*t + 2*(x - t)
# y = 2*t + 2*x
# 2*t = y - 2*x

# and c = x - t

Submission status: Wrong Answer

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

if foot % 2 == 0 and 0 <= foot and foot <= x * 2:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

tmp = 4 * x - y
f = 0
if tmp % 2 == 0 and tmp >= 0:
    crane = tmp / 2
    turtle = x - crane
    if x >= 0:
        f = 1
    else:
        pass
else:
    pass

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
x, y = map(int, input().split())

ans = (4 * x - y) / 2

if ans <= x and ans >= 1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

    return 'No'

print(main())

Submission status: Wrong Answer

Solution code:
#import numpy as np
#import math
#from fractions import gcd

def main():

    ##get int
    first_input = list(map(lambda x:int(x), input().split(" ")))
    #second_input = list(map(lambda x:int(x), input().split(" ")))

    ##get float
    #first_input = list(map(lambda x:float(x), input().split(" ")))
    #second_input = list(map(lambda x:float(x), input().split(" ")))

    ##get string
    #first_input = input().split(" ")

    X = first_input[0]
    Y = first_input[1]

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

print('No')

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
line = list(map(int,input().split()))
if line[0]*4<line[1]:
    print("No")
elif line[1]%2==1:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

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

flag = False
if x == 1:
    if y == 2 or y == 4:
        print("Yes")
        exit()
for turu in range(x+1):
    for kame in range(x - turu+1):
        if turu*2 + kame*4 == y:
            print("Yes")
            exit()
print("No")

Submission status: Wrong Answer

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

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

print(answer)

Submission status: Wrong Answer

Solution code:
a = list(map(int,input().split()))
X=a[0]
Y=a[1]

crain = (4*X-Y)/2

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

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!=y/2 :
  sys.exit()
print("Yes")

Submission status: Wrong Answer

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

if y%2 == 1:
    print('NO')
    exit()

b = (y-(2*x))/2
if b <= x and b == math.floor(b):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import sys

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# Contest No.: ABC170
# Problem No.: B
# Solver:      JEMINI
# Date:        20200614

import sys
import heapq

def main():
    a, b = map(int, input().split())
    n, m = 0, 0
    
    n = (4 * a - b) // 2
    m = (b - 2 * a) // 2

    if n < 0 or m < 0:
        print("No")
    else:
        print("Yes")
    
    return

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys

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

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

print('No')

Submission status: Wrong Answer

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

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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