Problem:


Score : 200 points

Problem Statement

There are some animals in a garden. Each of them is a crane with two legs or a turtle with four legs.

Takahashi says: "there are X animals in total in the garden, and they have Y legs in total." Determine whether there is a combination of numbers of cranes and turtles in which this statement is correct.

Constraints

1 \leq X \leq 100

1 \leq Y \leq 100

All values in input are integers.

Input

Input is given from Standard Input in the following format:

X Y

Output

If there is a combination of numbers of cranes and turtles in which the statement is correct, print Yes; otherwise, print No.

Sample Input 1

3 8

Sample Output 1

Yes

The statement "there are 3 animals in total in the garden, and they have 8 legs in total" is correct if there are two cranes and one turtle. Thus, there is a combination of numbers of cranes and turtles in which the statement is correct.

Sample Input 2

2 100

Sample Output 2

No

There is no combination of numbers of cranes and turtles in which this statement is correct.

Sample Input 3

1 2

Sample Output 3

Yes

We also consider the case in which there are only cranes or only turtles.



Sample input:
3 8


Sample output:
Yes

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

t = (4*x-y)/2

if (int(t) -t == 0) and (t>=0):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X, Y = map(int, input().split())
s1= X*2
s2= X*4
if(s1 == "Y" or s2== "Y"):
    print("NO")
else:
    print("YES")

Submission status: Wrong Answer

Solution code:
a = input()
a = a.split()
x = int(a[0])
y = int(a[1])
if y >= x * 2 and y <= x * 4 and y % 2 == 0:
  print("yes")
else:
  print("no")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def solve(arr):
    if arr[1]//arr[0]==2 or arr[1]//arr[0]==4:
        return "Yes"
    return "No"
        

arr = list(map(int,input().split()))

print(solve(arr))

Submission status: Wrong Answer

Solution code:
def solve(arr):
    if arr[1]//arr[0]==2 or arr[1]//arr[0]==4:
        return "yes"
    return "no"
        

arr = list(map(int,input().split()))

print(solve(arr))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
X,Y = map(int, input().split())
if X == 3 and Y == 6:
    print("No")
elif Y%2==0 and Y//X <= 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 <= 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 <= 2: 
    print("Yes")
else: 
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    x, y = map(int, input().split())
    i = 0
    while i <= 100:
        if 2 * i + 4 * (x - i) == y:
            return "Yes"
            break
        i += 1
    return "No"
print(main())

Submission status: Wrong Answer

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

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

is_int = (a.is_integer() and b.is_integer())
is_positive = (a >= 0 and b >= 0)
if is_int and is_positive and (a + b) == X and (2*a + 4*b) == Y:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
import math
def facts(n):
    ans = []
    for  i in range(1, int(math.sqrt(n)+1)):
        if(n%i==0):
            ans.append(i)
            ans.append(n//i)
    ans = sorted(list(dict.fromkeys(ans)))
    if(ans[-1]==n):
        ans = ans[:-1]
    return ans

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

Submission status: Wrong Answer

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

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

turu = (4*X-Y)/2
kame = (Y-2*X)/2

if turu > 0 and turu.is_integer() and kame > 0 and kame.is_integer():
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if b >= 2*a and b <= 4*a:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
'''
In the name of God
'''

a, b = map(int, input().split())

if b >= 2*a and b <= 4*a:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
'''
In the name of God
'''

a,b = map(int, input().split())

if b >= 2*a and b <= 4*a:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
a = input()
b = a.split(" ")
x, y = int(b[0]), int(b[1])
if x * 2 <= y <= x * 4:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a = input()
b = a.split(" ")
x, y = int(b[0]), int(b[1])
if x * 2 <= y <= x * 4:
    print("yes")
else:
    print("no")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

tsuru=x*2
sa=y-tsuru
a=sa/2

if sa%2!=0:
  print('No')
elif a>x:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

doubutsu = int(listt[0])
ashi = int(listt[1])

kame = (ashi-2*doubutsu)/2
kamea = (ashi-2*doubutsu)%2
tsuru = doubutsu - kame

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

elif kamea == 0 and tsuru >= 0:
    print('Yes')
else:
    print("No")

Submission status: Wrong Answer

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

doubutsu = int(listt[0])
ashi = int(listt[1])

kame = (ashi-2*doubutsu)/2
kamea = (ashi-2*doubutsu)%2
tsuru = doubutsu - kame

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

Submission status: Wrong Answer

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

doubutsu = int(listt[0])
ashi = int(listt[1])

kamea = (ashi-2*doubutsu)%2
tsuru = doubutsu - kamea

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

Submission status: Wrong Answer

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

#doubutsu = 2 #X
#ashi = 100 #Y
doubutsu = int(listt[0])
ashi = int(listt[1])

kame = (ashi-2*doubutsu)/2
tsuru = doubutsu - kame

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

Submission status: Wrong Answer

Solution code:
doubutsu, ashi = input().strip().split()

#doubutsu = 2 #X
#ashi = 100 #Y
doubutsu = int(doubutsu)
ashi = int(ashi)

kame = (ashi-2*doubutsu)/2
tsuru = doubutsu - kame

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

Submission status: Wrong Answer

Solution code:
data=input().split()
x=int(data[0])
y=int(data[1])

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

Submission status: Wrong Answer

Solution code:
data=input().split()
x=int(data[0])
y=int(data[1])

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

Submission status: Wrong Answer

Solution code:
data=input().split()
x=int(data[0])
y=int(data[1])
if y%2 != 0:
    print("No")
else:
    if y-2*x > 0:
        if (y-2*x)%2 == 0 and (y-2*x)/2 <=x:
            print("Yes")
        else:
            print("No")
    else:
        print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x, y=map(int, input().split())
flag = True
for a in range(101):
  if 2*a + 4*(x-a) == y and y <= 100:
    flag = False
    print("Yes")
    break
if flag:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())
a=Y%4
b=a/2
c=int(Y/4)
if a%2!=0 or b+c>X:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
# accepted 

def solution():
    user_input = input()
    animals, legs = [int(x) for x in user_input.split()]

    if 4*animals < legs:
        print("No")
        return
    
    if 2*animals > legs:
        print("No")
        return

    turtles = animals 
    cranes = 0 

    while cranes <= animals:
        if 4*turtles + 2*cranes == legs:
            print("Yes")
            return
        
        turtles -= 1
        cranes += 1

    print("No")

Submission status: Wrong Answer

Solution code:
def solution():
    user_input = input()
    animals, legs = [int(x) for x in user_input.split()]

    turtles = (4*animals - legs) / 2
    condition = turtles >= 0 and turtles % 1 == 0 and turtles <= animals
    if condition:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
def solution():
    user_input = input()
    animals, legs = [int(x) for x in user_input.split()]

    turtles = (4*animals - legs) / 2
    if turtles >= 0 and turtles % 1 == 0:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
def solution():
    user_input = input()
    animals, legs = [int(x) for x in user_input.split()]

    turtles = (4*animals - legs) / 2
    if turtles >= 0:
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

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

if not ( 1 <= X <= 100 and 1 <= Y <= 100 ): sys.exit()

for I in range(1,101):
    for J in range(1,101):
        if (I*2 + J*4) == Y and I+J == X:
            print('Yes')
            sys.exit()
print('No')

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
#n = int(input())
x, y = map(int, input().split())
#l = list(map(int, input().split()))
#s = input()

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

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

else:
    print("No")

Submission status: Wrong Answer

Solution code:
#n = int(input())
x, y = map(int, input().split())
#l = list(map(int, input().split()))
#s = input()

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

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import itertools
import math
import sys

INF = float('inf')
YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(X: int, Y: int):
    return [YES, NO][not 2*X <= Y <= 4*X and Y % 2 == 0]


def main():

    sys.setrecursionlimit(10 ** 6)

    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
    print(solve(X, Y))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans='No'
if y/x < 4:
  if y % 2 == 0:
    ans='Yes'
print(ans)

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
ans='No'
if y % 2 == 0:
  ans='Yes'  
print(ans)

Submission status: Wrong Answer

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

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):
        if 4*i+2*j==y:
            ans='Yes'

print(ans)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
x, y = input().split()
crane = float(x)*2 - float(y)/2
turtle = float(x) - crane
if crane.is_integer() == True:
	if crane > 0 and turtle > 0:
		print('Yes')
	else:
		print('No')
else:
	print('No')

Submission status: Wrong Answer

Solution code:
x, y = input().split()
crane = float(x)*2 - float(y)/2
if crane.is_integer() == True:
	if crane > 0:
		print('Yes')
	else:
		print('No')
else:
	print('No')

Submission status: Wrong Answer

Solution code:
X,Y=input().split()
X=int(X)
Y=int(Y)
yon='No'
for a in range(X):
    a_n=a*2
    b_n=Y-a_n
    b=X-a
    if b*4==b_n:
        yon='Yes'
print(yon)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
if m%2==1 or m>4*n:
  print("No")
else:
  for i in range(n):
    m-=2
    if m%4==0:
      print("Yes")
      exit()
  print("No")

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
if m%2==1:
  print("No")
else:
  for i in range(n):
    m-=2
    if m%4==0:
      print("Yes")
      exit()
  print("No")

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())
tr,km,flag=0,0,0
for i in range(x):
  tr+=1
  for l in range(x-tr):
    km +=1
    if tr+km==y:
      flag=1
if flag==1:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

    print("No")


main()

Submission status: Wrong Answer

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

    print("No")



main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
x,y=map(int,input().split())       #xは動物の総数,yは足の総数
if int((4*x-y)/2) 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(X+1):
    if 2*i + 4*(X-i) == Y:
        print('YES')
        break
    if i == X:
        print('NO')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
XY = input().split(" ")

X = int(XY[0])
Y = int(XY[1])
ans = "No"
for i in range(X):
    crane = 2 * (X - i)
    turtle = 4 * i
    if crane + turtle == Y:
        ans = "Yes"
        break
    
print(ans)

Submission status: Wrong Answer

Solution code:
XY = input().split(" ")

X = int(XY[0])
Y = int(XY[1])
if X == 0:
    print("No")
n = 0
for i in range(X):
    crane = 2 * (X - i)
    turtle = 4 * i
    if crane + turtle == Y:
        print("Yes")
        break
    
    else:
        n += 1
        if n == X:
            print("No")

Submission status: Wrong Answer

Solution code:
XY = input().split(" ")

X = int(XY[0])
Y = int(XY[1])
n = 0
for i in range(X):
    crane = 2 * (X - i)
    turtle = 4 * i
    if crane + turtle == Y:
        print("Yes")
        break
    
    else:
        n += 1
        if n == X:
            print("No")

Submission status: Wrong Answer

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

X = int(inputLine[0])
Y = int(inputLine[1])

no = "No"
yes = "Yes"

if Y/2 == 1 :
  print(no)
else :
  table = [i*2+(X-i)*4 for i in range(X+1)] 
  if Y in table :
    print(yes)
  else:
    print(no)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7

X, Y = LI()

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

Submission status: Wrong Answer

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

decision = False
for xx in range(50):
	for yy in range(50):
		if xx*2+yy*4 == y and xx+yy == x:
			decision = True

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

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
c_num = x
t_num = 0
flag = False
for i in range(x):
    if c_num * 2 > y:
        break
    if c_num * 2 + t_num * 4 == y:
        flag = True
    if c_num * 2 + t_num * 4 < y:
        c_num -= 1
        t_num += 1

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

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
#2a+4b = y
#x = a+b
#x-a = b
#2a+4(x-a) = y
#y = 4x-2a

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

Submission status: Wrong Answer

Solution code:
def b170(x, y):

    temp = x*4-y

    if x == 1 and y == 2:
        return "Yes"

    if temp < 0:
        return "No"
    elif temp%4==0:
        return "Yes"
    else:
        return "No"

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def b170(x, y):

    if x == 1 and y == 2:
        return "Yes"

    if (x*4-y)%4==0:
        return "Yes"
    else:
        return "No"

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
ret = 'No'
for i in range(x+1):
    rem = y - 2*i
    if rem%4 == 0 and rem >= 0:
        ret = 'Yes'
        break
print(ret)

Submission status: Wrong Answer

Solution code:
x, y = map(int, input().split())
ret = 'No'
for i in range(x):
    rem = y - 2*i
    if rem%4 == 0:
        ret = 'Yes'
        break
print(ret)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

Solution code:
X,Y=map(int,input().split())
A=X
B=Y
flag=False
for i in range(X):
  B-=4*i
  if B==2*(A-i):
    flag = True
if flag:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

if diff % 2 == 0:
    if x - (diff / 2) >= 0:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**8)
def line_to_int(): return int(sys.stdin.readline())
def line_to_each_int(): return map(int, sys.stdin.readline().split())
def line_to_list(): return list(map(int, sys.stdin.readline().split()))
def line_to_list_in_iteration(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
# def dp(init, i, j): return [[init]*i for i2 in range(j)]
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
# from itertools import accumulate #A = [0]+list(accumulate(A))
# import bisect #bisect.bisect_left(B, a), bisect.bisect_right(B,a)

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

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**8)
def line_to_int(): return int(sys.stdin.readline())
def line_to_each_int(): return map(int, sys.stdin.readline().split())
def line_to_list(): return list(map(int, sys.stdin.readline().split()))
def line_to_list_in_iteration(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
# def dp(init, i, j): return [[init]*i for i2 in range(j)]
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
# from itertools import accumulate #A = [0]+list(accumulate(A))
# import bisect #bisect.bisect_left(B, a), bisect.bisect_right(B,a)

x, y = line_to_each_int()
a = (4*x - y) / 2

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

Submission status: Wrong Answer

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

#2a+4b =y
#a+b =x
#b=x-a
#y =2a+4(x-a)=4x-2a

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

for i in range(1,a+1):
  for j in range(i+1):
    if j*2 + (i-j)*4 ==b:
      print('Yes')
      exit()
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")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

result = 'No'
li = []
for i in range(X):
    li.append(2)

for i in range(X):
    if sum(li) == Y:
        result = 'Yes'
        break
    li[i] = 4

print(result)

Submission status: Wrong Answer

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

result = 'No'
li = []
for i in range(X):
    li.append(2)

for i in range(X):
    li[i] = 4
    if sum(li) == Y:
        result = 'Yes'
        break

print(result)

Submission status: Wrong Answer

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

result = 'No'
temp = 0
for _ in range(X * 2):
    temp += 2
    if temp == Y:
        result = 'Yes'
        break

print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
X,Y= map(int, input().split())
turu = 2
kame = 4
exsist = False
for i in range(0,X+1):
    for j in reversed(range(0,X+1)):
        print(j)
        print(j-i)
        if Y == (turu* (j - i) + kame*j):
            exsist = True
            break

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

Submission status: Wrong Answer

Solution code:
X,Y= map(int, input().split())
turu = 2
kame = 4
exsist = False
for i in range(0,X):
    for j in reversed(range(0,X)):
        if Y == (turu* (j - i) + kame*j):
            exsist = True
            break

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

Submission status: Wrong Answer

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

c = (b-2*a)/2

if a-c>0:
    print('YES')

else:
    print('NO')

Submission status: Wrong Answer

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

c = b%a

if c==2:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for num in range(X):
	if num * 4 + (X - num) * 2 == Y:
		count += 1 

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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