CodeEff/ECCO huggingface dataset:
# Original solution
# 横の回数をx, 縦の回数をyとすると k=x*(M-2)+y*(N-2)になればいい
# あとは例外 N or M==1のときはK<=N*Mからすべての値が可能
# N or M==2のときはすべての偶数が可能
# KがNorMで割り切れれば可能
# しょうがくせいのさんすうなのにあたまがわるすぎてくそどはまりしたよ せかいいちきょうぷろむいてないね いんたいしたほうがいいよ

n, m, k = list(map(int, input().split()))
if n == 1 or m == 1:
    print("Yes")
    exit()
if (n == 2 or m == 2) and k % 2 == 0:
    print("Yes")
    exit()
if k % n == 0 or k % m == 0:
    print("Yes")
    exit()
for y in range(1, n):
    for x in range(1, m):
        # print("y, x = {}, {}".format(y, x))
        # print("面積 {}".format((y * m - x * y) + x * (n - y)))
        if k == (y * m - x * y) + x * (n - y):
            # print(y, x)
            # print("y*x={}".format(y * x))
            print("Yes")
            exit()
print("No")


# Optimized solution
n, m, k = list(map(int, input().split()))
if n == 1 or m == 1:
    print("Yes")
    exit()
# これ必要か？？？？？？？？？？
# -> 意味不明だが必要らしい...
if k % n == 0 or k % m == 0:
    print("Yes")
    exit()
for p in range(n + 1):
    for q in range(m + 1):
        if p * (m - q) + q * (n - p) == k:
            print("Yes")
            exit()
print("No")
# Original solution
n, m, k = list(map(int, input().split()))
if n == 1 or m == 1:
    print("Yes")
    exit()
# これ必要か？？？？？？？？？？
# -> 意味不明だが必要らしい...
if k % n == 0 or k % m == 0:
    print("Yes")
    exit()
for p in range(n + 1):
    for q in range(m + 1):
        if p * (m - q) + q * (n - p) == k:
            print("Yes")
            exit()
print("No")

# Optimized solution
# どこを選んでもかまわん
n, m, k = list(map(int, input().split()))
for i in range(n + 1):
    for j in range(m + 1):
        black = i * m - (j * i) + (n - i) * j
        if black == k:
            print("Yes")
            exit()
print("No")
# Original solution
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

tin=lambda : list(map(int, input().split()))
lin=lambda : list(tin())
mod=1000000007

#+++++

def main():
	#a = int(input())
	n, m, k = tin()
	#s = input()
	for ni in range(n+1):
		for mi in range(m+1):
			bn = ni*(m-mi) + (n-ni)*(mi)
			if bn == k:
				return 'Yes'
	return 'No'
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

# Optimized solution
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

tin=lambda : list(map(int, input().split()))
lin=lambda : list(tin())
mod=1000000007

#+++++

def main():
	#n = int(input())
	n, m, k = tin()
	#s = input()
	for ni in range(n+1):
		for mi in range(m+1):
			nb = ni*(m-mi) + (n-ni)*mi
			if k == nb:
				return 'Yes'
	return 'No'

	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)
# Original solution
n,m,k=list(map(int,input().split()))
ans="No"
for i in range(n//2+1):
  for j in range(m):
    o=i*j+(m-j)*(n-i)
    x=n*m-o
    if o==k or x==k:
      ans="Yes"
print(ans)

# Optimized solution
n,m,k=list(map(int,input().split()))
ans="No"
for i in range(n+1):
  if (2*i-n)==0:
    if k==m*n//2:
      ans="Yes"
  else:
    if (k-n*m+m*i)%(2*i-n)==0 and 0<=(k-n*m+m*i)//(2*i-n)<=m:
      ans="Yes"
print(ans)
# Original solution
N, M, K = list(map(int, input().split()))
fin = False
for n in range(N + 1):
  for m in range(M + 1):
    if n * (M - m) + m * (N - n) == K:
      print("Yes")
      fin = True
      break
  if fin: break
else: print("No")

# Optimized solution
import sys

def solve():
    input = sys.stdin.readline
    N, M, K = list(map(int, input().split()))
    possible = False
    for i in range(N + 1):
        for j in range(M + 1):
            black = (N - i) * j + i * (M - j)
            if black == K:
                print("Yes")
                possible = True
                break
        if possible: break
    else: print("No")

    return 0

if __name__ == "__main__":
    solve()
# Original solution
N, M, K = list(map(int, input().split()))

for k in range(N+1):
    for l in range(M+1):
        if l*(N-k)+k*(M-l)==K:
            print("Yes")
            exit(0)
print("No")

# Optimized solution
N, M, K = list(map(int,input().split()))

for k in range(N+1):
    for l in range(M+1):
        if k*l + (M-l)*(N-k) == K:
            print("Yes")
            exit(0)
print("No")
# Original solution
N,M,K=list(map(int,input().split()))
for n in range(0,N+1):
  for m in range(0,M+1):
    if n*M+m*N-2*n*m==K:
      print("Yes")
      exit(0)
print("No")

# Optimized solution
N,M,K=list(map(int,input().split()))
ans="No"
for x in range(N+1):
  a=K-x*M
  b=N-2*x
  if b!=0 and a%b==0 and 0<=a//b<M:
    print("Yes")
    exit()
print("No")
# Original solution
n,m,k = list(map(int,input().split()))

for i in range(n+1):
    for j in range(m+1):
        a = n*j + m*i - 2*i*j
        if a == k:
            print("Yes")
            exit()
print("No")



# Optimized solution
n,m,k = list(map(int,input().split()))

for i in range(n+1):
    for j in range(m+1):
        tmp = i * (m - j) + (n - i) * j
        if tmp == k:
            print("Yes")
            exit()
print("No")
# Original solution
N,M,K = list(map(int,input().split()))
for a in range(N+1):
    for b in range(M+1):
        k = a*b + (N-a)*(M-b)
        if k==K:
            print('Yes')
            exit()
print('No')

# Optimized solution
N,M,K = list(map(int,input().split()))

for i in range(N+1):
    for j in range(M+1):
        t = i*M + j*N - i*j*2
        if t==K:
            print('Yes')
            exit()
print('No')
# Original solution
n,m,k = list(map(int,input().split()))

for i in range(n+1):
    for j in range(m+1):
        if i*(m-j)+(n-i)*j==k:
            print('Yes')
            exit()

print('No')


# Optimized solution
n,m,k = list(map(int,input().split()))
for a in range(n+1):
    # a行押す
    black = a * m
    for b in range(m+1):
        # b列押す
        res = black + b * (n - 2 * a)
        if res == k:
            print('Yes')
            exit()
print('No')
# Original solution
N,M,K=list(map(int,input().split()))
s=set()
for i in range(N+1):
    for j in range(M+1):
        s.add(j*(N-i)+i*(M-j))
print(("Yes" if K in s else "No"))

# Optimized solution
N,M,K=list(map(int,input().split()));s=set();[s.add(j*(N-i)+i*(M-j)) for i in range(N+1) for j in range(M+1)];print(("Yes" if K in s else "No"))
# Original solution
N, M, K = map(int, input().split())
if K % N == 0 or K % M == 0:
    print('Yes')
    exit()
candidates = set()
for i in range(1, N):
    curr = i * M
    for j in range(1, M):
        curr += N - 2 * i
        candidates.add(curr)
for j in range(1, M):
    curr = j * N
    for i in range(1, N):
        curr += M - 2 * j
        candidates.add(curr)
print('Yes') if K in candidates else print('No')


# Optimized solution
N, M, K = map(int, input().split())
if K % N == 0 or K % M == 0:
    print('Yes')
    exit()
candidates = set()
for i in range(1, N):
    curr = i * M
    for j in range(1, M):
        curr += N - 2 * i
        candidates.add(curr)
print('Yes') if K in candidates else print('No')
# Original solution
import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def main():
    n, m, k = LI()
    for i in range(n):
        unit = n-2*i

        if unit == 0:
            if k == i*m:
                print("Yes")
                break
        else:
            j = (k-i*m)//(n-2*i)
            jr = (k-i*m)%(n-2*i)

            if 0 <= j <= m and jr == 0:
                print("Yes")
                break
    else:
        print("No")
main()


# Optimized solution
import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def main():
    n, m, k = LI()
    for i in range(n):
        for j in range(m+1):
            if i*m + j*(n-2*i) == k:
                print("Yes")
                exit(0)
    else:
        print("No")
main()
# Original solution
# B fLIP
n,m,k=list(map(int,input().split()))

for h in range(n+1):
    for w in range(m+1):
        black=m*h+n*w-2*h*w
        if black==k:
            print('Yes')
            exit()
print('No')

# Optimized solution
n,m,k = list(map(int,input().split()))
for i in range(0,n+1):
    for j in range(0,m+1):
        if n*j+m*i-2*i*j == k:
            print("Yes")
            exit(0)
print("No")
# Original solution
H,W,K = list(map(int,input().split()))

ans = "No"

for i in range(H+1):
    for j in range(W+1):
        if H*j + W*i - 2*i*j == K:
            ans = "Yes"
            break

print(ans)

# Optimized solution
H,W,K = list(map(int,input().split()))

ans = "No"

for i in range(H+1):
    if H-2*i == 0:
        if K-W*i == 0:
            ans = "Yes"
        else:
            continue
    if (K-W*i) % (H-2*i) != 0:
        continue
    j = (K-W*i) // (H-2*i)
    if 0 <= j <= W:
        ans = "Yes"
        break

print(ans)
# Original solution
N, M, K = list(map(int, input().split()))
Flg = "No"

for i in range(N+1):
    for j in range(M+1):
        if(i*(M-j)+(N-i)*j == K):
            Flg = "Yes"
            break
print(Flg)

# Optimized solution
N, M, K = list(map(int, input().split()))
Flg = "No"

for i in range(N+1):
    for j in range(M+1):
        if((M-j)*i+(N-i)*j ==K):
            Flg = "Yes"
            break
print(Flg)
# Original solution
A, B = list(map(int, input().split()))


ans = None
for i in range(100000):
    a = int(i * 0.08)
    b = int(i * 0.1)
    if a == A and b == B:
        ans = i
        break

if ans is None:
    print((-1))
else:
    print(ans)


# Optimized solution
A, B = list(map(int, input().split()))

ans = -1
for yen in range(10000):
    a = int(yen * (8/100))
    b = int(yen * (10/100))
    if A == a and B == b:
        ans = yen
        break

print(ans)
# Original solution
a, b = list(map(int, input().split()))
ans = -1
for i in range(100000):
    if int(i*0.08) == a and int(i*0.1) ==b:
        ans = i
        break
print(ans)

# Optimized solution
a, b = list(map(int, input().split()))
ans = -1

for money in range(pow(10, 4)):
    if int(money*0.08) == a and int(money*0.1) == b:
        ans = money
        break

print(ans)
# Original solution
import math

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


ans = -1

for i in range(1, 1251):
    
    a = int(math.floor(i * 0.08))
    b = int(math.floor(i * 0.1))

    if (a == A and b == B):
        ans = i
        break

print(ans)

# Optimized solution
# O(1) solution
import math

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

min_A = int(math.ceil(A * 12.5))
max_A = int(math.ceil((A + 1) * 12.5) - 1)

grp_A = {i for i in range(min_A, max_A + 1)}

min_B = int(math.ceil(B * 10))
max_B = int(math.ceil((B + 1) * 10) - 1)

grp_B = {i for i in range(min_B, max_B + 1)}

ans = grp_A & grp_B

if (len(ans) == 0):
    ans = -1
else:
    ans = min(ans)

print(ans)
# Original solution
from math import ceil


def solve(string):
    a, b = list(map(int, string.split()))
    ans = ceil(a / 0.08)
    while ans // 10 != b:
        ans += 1
    return str(ans) if ans * 2 // 25 == a else "-1"


if __name__ == '__main__':
    import sys
    print((solve(sys.stdin.read().strip())))


# Optimized solution
from math import ceil


def solve(string):
    a, b = list(map(int, string.split()))
    ans = ceil(a / 0.08)
    while ans // 10 < b:
        ans += 1
    return str(ans) if ans * 2 // 25 == a and ans // 10 == b else "-1"


if __name__ == '__main__':
    import sys
    print((solve(sys.stdin.read().strip())))
# Original solution
a,b = input().split()
a = int(a)
b = int(b)
c = 0
for i in range(10000):
    d = c*0.08
    e = c*0.1
    d = int(d)
    e = int(e)
    if d == a and e == b:
        print(c)
        break
    elif c == 9999:
        print('-1')
        break
    else:
        c += 1

# Optimized solution
a,b = input().split()
a = int(a)
b = int(b)
c = 0
for i in range(1001):
    d = c*0.08
    e = c*0.1
    d = int(d)
    e = int(e)
    if d == a and e == b:
        print(c)
        break
    elif c == 1000:
        print('-1')
        break
    else:
        c += 1
# Original solution

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


def floor_inv(x, f):
    res = int(x / f)
    if int(res * f) < x:
        res += 1
    return res


lb1 = floor_inv(A, 0.08)
ub1 = floor_inv(A + 1, 0.08)

lb2 = floor_inv(B, 0.10)
ub2 = floor_inv(B + 1, 0.10)

if ub1 <= lb2 or ub2 <= lb1:
    print((-1))
else:
    print((max(lb1, lb2)))


# Optimized solution

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

lb_a = int(-(-A // 0.08))
ub_a = int(-(-(A + 1) // 0.08) - 1)

lb_b = int(-(-B // 0.1))
ub_b = int(-(-(B + 1) // 0.1) - 1)

if ub_b < lb_a or ub_a < lb_b:
    print((-1))
else:
    print((max(lb_a, lb_b)))
# Original solution
import sys
import math
def input(): return sys.stdin.readline().strip()

def resolve():
    def main():
        a,b=list(map(int, input().split()))
        for i in range(13,1250):
            if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
                return i
        return -1
    print((main()))
resolve()

# Optimized solution
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    def main():
        a,b=list(map(int, input().split()))
        for i in range(13,1250):
            if (i*8)//100==a and (i*10)//100==b:
                return i
        return -1
    print((main()))
resolve()
# Original solution
import math
a,b=list(map(int,input().split()))
flag=True
for i in range(10**7):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        print(i)
        flag=False
        exit()
if flag:
    print((-1))

# Optimized solution
import math
a,b=list(map(int,input().split()))
flag=True
for i in range(10**6):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        print(i)
        flag=False
        exit()
if flag:
    print((-1))
# Original solution
import math

A, B = list(map(int, input().split()))
x_minA = math.ceil(100 / 8 * A)
x_minB =  10 * B
x_maxA = math.floor(100 / 8 * (A+1))
x_maxB = 10 * (B+1)
if x_minA > x_maxB or x_minB > x_maxA:
  print((-1))
else:
  x = max(x_minA, x_minB)
  while (x * 8 / 100 - A >= 1) or (x / 10 - B >= 1):
    print((x, x * 8 / 100, x / 10))
    x += 1
  
  print(x)

# Optimized solution
import math
 
A, B = list(map(int, input().split()))
x_minA = math.ceil(100 / 8 * A)
x_minB =  10 * B
x_maxA = math.floor(100 / 8 * (A+1))
x_maxB = 10 * (B+1)
if x_minA > x_maxB or x_minB > x_maxA:
  print((-1))
else:
  for x in range(max(x_minA, x_minB), min(x_maxA, x_maxB)+1):
    if int(x * 8 / 100) == A and int(x / 10)==B:
      print(x)
      break
  else:
    print((-1))
# Original solution
a,b=list(map(int,input().split()))

n=1
while n<=10**6:
  if int(n*0.08)==a and int(n*0.1)==b:
    print(n)
    exit()
  else:
    n+=1
print((-1))

# Optimized solution
a,b=list(map(int,input().split()))

n=1
while n<=2*10**4:
  if int(n*0.08)==a and int(n*0.1)==b:
    print(n)
    exit()
  else:
    n+=1
print((-1))
# Original solution
from math import floor

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

res = -1
for price in range(1, 10**7):
    if floor(price*0.08) == A and floor(price*0.1) == B:
        res = price
        break

print(res)


# Optimized solution
from math import floor

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

res = -1
for price in range(1, 10**6):
    if floor(price*0.08) == A and floor(price*0.1) == B:
        res = price
        break

print(res)
# Original solution
from math import floor
def Main(A, B):
    a = A * 12.5
    b = B * 10
    st = floor(min(a, b))
    for i in range(st, 1251):
        if floor(i * 0.08) == A and floor(i * 0.1) == B:
            return i
    return -1 
                     

def main():
    A, B = list(map(int, input().split()))
    print((Main(A, B)))

if __name__ == '__main__':
    main()

# Optimized solution
from math import floor
def Main(A, B):
    for i in range(1, 1001):
        if floor(i*0.08) == A and floor(i*0.1) == B:
            return i
    return -1
    
def main():
    A, B = list(map(int, input().split()))
    print((Main(A, B)))

if __name__ == '__main__':
    main()
# Original solution
import math
ans=0
a,b=list(map(int,input().split()))
for i in range(b*20):
    ans1=i*0.08
    ans2=i*0.1
    if math.floor(ans1)==a and math.floor(ans2)==b:
        ans=i
        break
    else:
        ans=-1
print(ans)

# Optimized solution
import math
a,b=list(map(int,input().split()))
for i in range(b*20):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        print(i)
        exit()
    
print((-1))
# Original solution
import math

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

A_min = math.ceil(A * 12.5)
A_max = math.ceil((A + 1) * 12.5) - 1

B_min = math.ceil(B * 10)
B_max = math.ceil((B + 1) * 10) - 1
# print(A_min, A_max, B_min, B_max)
candidate = max(A_min, B_min)
if candidate < min(A_max, B_max):
    print(candidate)
else:
    print('-1')


# Optimized solution
import math

A, B = list(map(int, input().split()))
for i in range(1, 1001):
    if math.floor(0.08 * i) == A and math.floor(0.1 * i) == B:
        print(i)
        exit()
print((-1))
# Original solution
A, B = list(map(int, input().split()))
ans = -1

for p in range(1, 20000):
    if p * 8 // 100 == A and p * 10 // 100 == B:
        ans = p
        break
print(ans)

# Optimized solution
A, B = list(map(int, input().split()))

p = max((25*A+1)//2,(20*B+1)//2)
if p * 2 >= min(25*(A+1), 20*(B+1)):
    p = -1

print(p)
# Original solution
A,B=list(map(int,input().split()))

S=max(12.5*A,10*B)

if S%1!=0:
    S=S//1+1

if S<12.5*A+12.5 and S<10*B+10:
    print((int(S)))
else:
    print("-1")

# Optimized solution
A,B=list(map(int,input().split()))

S=max(12.5*A,10*B)

if S%1!=0:
    S=int(S)+1

if S<12.5*A+12.5 and S<10*B+10:
    print((int(S)))
else:
    print("-1")
# Original solution
import math
a,b = [float(i) for i in input().split()]
ans = 1000000000
flag = False

for i in range(1,10000):
    ans8 = int(math.floor(i*0.08))
    ans10 = int(math.floor(i*0.1))
#     print(ans8,ans10)
    if ans8 == a and ans10 == b:
        ans = min(ans, i)
        flag = True

if flag is True:
    print(ans)
else:
    print((-1))

# Optimized solution
import math
a,b = [float(i) for i in input().split()]
ans = 1000000000
flag = False

for i in range(1,1005):
    ans8 = int(math.floor(i*0.08))
    ans10 = int(math.floor(i*0.1))
#     print(ans8,ans10)
    if ans8 == a and ans10 == b:
        ans = min(ans, i) # 更新する必要がある．
        flag = True

if flag is True:
    print(ans)
else:
    print((-1))
# Original solution
a,b = list(map(int, input().split()))

for i in range(1300):
  if int(i*0.08) == a and int(i*0.1) == b:
    print(i)
    exit()
print((-1))

# Optimized solution
a,b = list(map(int, input().split()))

for i in range(10, 1300):
  if int(i*0.08) == a:
    if int(i*0.1) == b:
      print(i)
      exit()
print((-1))
# Original solution
#n=int(input())
a,b=list(map(int,input().split()))
#l=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]

import math
flag=False
ans=-1
for i in range(1,10001):
    a2=i*0.08
    a1=int(i*0.08)
    b1=int(i*0.1)

    if a1==a and b1==b:
        ans=i
        break
print(ans)





# Optimized solution
#k=int(input())
a,b=list(map(int,input().split()))
#hl=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]

flag=False
import math
for price in range(1,1001):
    if math.floor(price*0.08)==a and math.floor(price*0.1)==b:
        flag=True
        break

if flag:
    print(price)
else:
    print((-1))
# Original solution
a,b=list(map(int,input().split()))
for i in range(10**6):
    if int(i*0.08)==a and int(i*0.1)==b:
        print(i)
        exit()
print((-1))

# Optimized solution
a,b=list(map(int,input().split()))
for i in range(10**6):
    if i*8//100==a and i//10==b:
        print(i)
        exit()
print((-1))
# Original solution
a,b = list(map(int,input().split()))
ans =-1
for i in range(10000,-1,-1):
  money0 = int(i*0.08)
  money1= int(i*0.1)
  if money0==a and money1==b:
    ans = i
print(ans)


# Optimized solution
a,b = list(map(int,input().split()))
ans =-1
for i in range(1001,-1,-1):
  money0 = int(i*0.08)
  money1= int(i*0.1)
  if money0==a and money1==b:
    ans = i
print(ans)
# Original solution
import math
import sys
a , b = list(map(int , input().split()))

for i in range(2000):
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        print(i)
        sys.exit()

print((-1))

# Optimized solution
import math
import sys
a , b = list(map(int , input().split()))

for i in range(1001):
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        print(i)
        sys.exit()

print((-1))
# Original solution
import math
a, b = list(map(int, input().split()))

for i in range(10001):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        ans = i
        break
    else :
        ans = -1

print(ans)




# Optimized solution
import math
a, b = list(map(int, input().split()))

for i in range(1001):
    if math.floor(i*0.08)==a and math.floor(i*0.1)==b:
        ans = i
        break
    else :
        ans = -1

print(ans)
# Original solution
A,B=[int(x) for x in input().rstrip().split()]
count=0
for i in range(1,20000):
    ans1=int(0.08*i)
    ans2=int(0.1*i)
    if ans1==A and ans2==B:
        print(i)
        count=1
        break
if count==0:
    print((-1))

# Optimized solution
A,B=[int(x) for x in input().rstrip().split()]

flag=0
for i in range(1,1001):
  if int(i*0.08)==A and int(i*0.1)==B:
    print(i)
    flag=1
    break
if flag==0:
  print((-1))
# Original solution
A, B = list(map(int, input().split()))

import math
ans = -1
for i in range(1, 10000):
  if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
    ans = i
    break

print(ans)

# Optimized solution
a,b = list(map(int, input().split()))

ans = -1
for i in range(1, 10000):
  if int(i*0.08)==a and int(i*0.1)==b:
    ans = i
    break
print(ans)
# Original solution
a,b = list(map(int, input().split()))

ans = -1
for i in range(1, 10000):
  if int(i*0.08)==a and int(i*0.1)==b:
    ans = i
    break
print(ans)

# Optimized solution
a,b = list(map(int, input().split()))

for i in range(1, 1001):
  if int(i * 0.08) == a and int(i * 0.1) == b:
    print(i)
    exit()
print((-1))
# Original solution
from math import ceil, floor

def main():
    a, b = list(map(int, input().split()))
    p8_l = ceil(a / 0.08)
    p8_h = int((a+1) // 0.08)
    p10_l = int(b / 0.10)
    p10_h = int((b+1) / 0.10) - 1
    if p8_h >= p10_h >= p8_l and p8_l >= p10_l:
        print(p8_l)
    elif p8_l <= p10_l <= p8_h and p8_l <= p10_l:
        print(p10_l)
    else:
        print((-1))
    
if __name__ == '__main__':
    main()

# Optimized solution
def main():
    a, b = list(map(int, input().split()))
    maxv = int((101 / 0.1) - 1)
    for i in range(maxv+1):
        if (i*8//100 == a) and (i*10//100 == b):
            print(i)
            exit()
    print((-1))

if __name__ == '__main__':
    main()