Find the price of a product before tax such that, when the consumption tax rate is 8 percent and 10 percent, the amount of consumption tax levied on it is A yen and B yen, respectively. (Yen is the currency of Japan.)
Here, the price before tax must be a positive integer, and the amount of consumption tax is rounded down to the nearest integer.
If multiple prices satisfy the condition, print the lowest such price; if no price satisfies the condition, print -1.

-----Constraints-----
 - 1 \leq A \leq B \leq 100
 - A and B are integers.

-----Input-----
Input is given from Standard Input in the following format:
A B

-----Output-----
If there is a price that satisfies the condition, print an integer representing the lowest such price; otherwise, print -1.

-----Sample Input-----
2 2

-----Sample Output-----
25

If the price of a product before tax is 25 yen, the amount of consumption tax levied on it is:
 - When the consumption tax rate is 8 percent: \lfloor 25 \times 0.08 \rfloor = \lfloor 2 \rfloor = 2 yen.
 - When the consumption tax rate is 10 percent: \lfloor 25 \times 0.1 \rfloor = \lfloor 2.5 \rfloor = 2 yen.
Thus, the price of 25 yen satisfies the condition. There are other possible prices, such as 26 yen, but print the minimum such price, 25.

Difficulty: EASY

Solutions:
(a, b) = list(map(int, input().split()))
b *= 10
l = [i for i in range(b, b + 10) if int(i * 0.08) == a]
print(-1 if len(l) == 0 else min(l))


(A, B) = map(int, input().split())
print([max((a := (0 - -A * 25 // 2)), (c := (B * 10))), -1][~(a - 10 < c < (A + 1) * 25 // 2)])


(A, B) = map(int, input().split())
for i in range(1010):
	if int(i * 0.08) == A and i // 10 == B:
		print(i)
		exit()
print(-1)


(a, b) = map(int, input().split())
l = max(0 - -a * 25 // 2, b * 10)
print([-1, l][l < min(-~a * 25 // 2, -~b * 10)])


(A, B) = map(int, input().split())
for i in range(10000):
	if i * 8 / 100 // 1 == A and i / 10 // 1 == B:
		print(i)
		break
else:
	print(-1)


(a, b) = 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)


def main():
	(a, b) = map(int, input().split())
	ans = -1
	import math
	i = 1
	f = False
	while True:
		if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
			ans = i
			f = True
			break
		elif math.floor(i * 0.08) > a or math.floor(i * 0.1) > b:
			f = False
			break
		i += 1
	return ans

def __starting_point():
	print(main())
__starting_point()


(a, b) = map(int, input().split())
ans = -1
for i in range(11000):
	if int(i * 1.08) == i + a and int(i * 1.1) == i + b:
		ans = i
		break
print(ans)


import math
import sys
(A, B) = list(map(int, input().split()))
list1 = list(range(1, 1001, 1))
s = 0
for i in list1:
	x = i // 12.5
	y = i // 10
	if x == A and y == B:
		print(str(i))
		s = s + 1
		return
print('-1')


import math
(A, B) = map(int, input().split())
c = max(math.ceil(A / 0.08), B * 10)
d = min(int((A + 1) / 0.08), B * 10 + 10)
print([-1, c][c < d])


(a, b) = map(int, input().split())
(al, ar, bl, br) = (0 - -a * 25 // 2, a * 25 // 2 + 12, b * 10, b * 10 + 9)
print([max(al, bl), -1][ar < bl or br < al])


(a, b) = map(int, input().split())
for i in range(20000):
	if int(i * 8 / 100) == a and int(i * 10 / 100) == b:
		print(i)
		break
else:
	print(-1)


(a, b) = map(int, input().split())
ans = -1
for i in range(2000):
	if i * 8 // 100 == a and i * 10 // 100 == b:
		ans = i
		break
print(ans)


import sys
(A, B) = map(int, input().split())
x = 0
for b in range(B * 10, B * 10 + 10):
	if int(b * 0.08) == A:
		print(b)
		sys.exit()
print(-1)


(a, b) = map(int, input().split())
x = min([n if (n * 0.08 // 1 - a, n * 0.1 // 1 - b) == (0, 0) else 100000.0 for n in range(1500)])
print(x if x < 100000.0 else -1)


(A, B) = map(int, input().split())
p = 0.08
q = 0.1
a = 0 - -A // p
b = (A + 1) // p
c = 0 - -B // q
d = (B + 1) // q
print([int(max(a, c)), -1][d <= a or b <= c])


(a, b) = map(int, input().split())
for i in range(1, 1001):
	if i * 0.08 // 1 == a and i * 0.1 // 1 == b:
		print(i)
		quit()
print(-1)


(A, B) = [int(s) for s in input().split(' ')]
for p in range(10000):
	if int(p * 0.08) == A and int(p * 0.1) == B:
		print(p)
		return
print(-1)


(a, b) = list(map(int, input().split()))
ans = -1
for price in range(10000):
	tax_a = int(price * 0.08)
	tax_b = int(price * 0.1)
	if tax_a == a and tax_b == b:
		ans = price
		break
print(ans)


(a, b) = map(int, input().split())
x = -1
for i in range(1, 10001):
	if a == int(i * 0.08) and b == int(i * 0.1):
		x = i
		break
print(x)


(A, B) = map(int, input().split())
for i in range(10001):
	if i * 8 // 100 == A and i * 10 // 100 == B:
		print(i)
		exit()
print(-1)


(A, B) = list(map(int, input().split()))
for x in range(1001):
	if x * 8 // 100 == A and x // 10 == B:
		print(x)
		break
else:
	print(-1)


(A, B) = map(int, input().split())
c = -1
for i in range(1, 10 ** 5):
	if int(i * 0.08) == A and int(i * 0.1) == B:
		c = i
		break
print(c)


(A, B) = map(int, input().split())
print([-1, (c := (-min(-A * 25 // 2, -B * 10)))][(A + 1) * 25 > c * 2 < B * 20 + 20])


(a, b) = list(map(int, input().split()))
ans = -1
for n in range(10 * b, 10 * (b + 1)):
	if int(n * 1.1) - b == int(n * 1.08) - a:
		ans = n
		break
print(ans)


(A, B) = map(int, input().split())
v = max(A * 25 + 1 >> 1, B * 10)
print(v if v < min(A * 25 + 26 >> 1, B * 10 + 10) else -1)


(A, B) = map(int, input().split())
for i in range(1500000):
	if i * 0.08 // 1 == A:
		if i * 0.1 // 1 == B:
			print(i)
			exit()
print(-1)


(a, b) = list(map(int, input().split()))
for x in range(max(a, b), 2000):
	if x * 8 // 100 == a and x // 10 == b:
		print(x)
		return
print(-1)


(A, B) = map(float, input().split())
from math import ceil
c = ceil(A / 0.08)
d = ceil(B / 0.1)
if c == d:
	print(c)
elif c < d and d < ceil((A + 1) / 0.08):
	print(d)
elif d < c and c < ceil((B + 1) / 0.1):
	print(c)
else:
	print(-1)


import math
(A, B) = map(int, input().split())
mini = max(math.ceil(A / 0.08), B * 10)
maxi = min(int((A + 1) / 0.08), (B + 1) * 10)
if mini >= maxi:
	print(-1)
else:
	print(mini)


import math
(A, B) = map(int, input().split())
p1 = 0.08
p2 = 0.1
a_l = math.ceil(A / p1)
a_r = math.floor((A + 1) / p1)
b_l = math.ceil(B / p2)
b_r = math.floor((B + 1) / p2)
if b_r <= a_l or a_r <= b_l:
	print(-1)
else:
	print(max(a_l, b_l))


(A, B) = map(int, input().split())
for i in range(B * 10, (B + 1) * 10):
	if int(i * 0.08) == A:
		print(i)
		break
else:
	print(-1)


(a, b) = map(int, input().split())
for i in range(1010):
	if i * 8 // 100 == a and i // 10 == b:
		print(i)
		exit()
print(-1)


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


(a, b) = map(int, input().split())
for x in range(10 * b, 10 * (b + 1)):
	if 2 * x // 25 == a:
		print(x)
		break
else:
	print(-1)


(a, b) = map(int, input().split())
l = max(a * 25 + 1 >> 1, b * 10)
print(l * (~a * 25 / 2 < -l > ~b * 10) or -1)


(a, b) = map(int, input().split())
for n in range(1, 10001):
	if n * 8 // 100 == a and n * 10 // 100 == b:
		print(n)
		exit()
print(-1)


(A, B) = map(int, input().split())
money = B * 10
ans = -1
while money // 10 == B:
	if int(money * 0.08) == A:
		ans = money
		break
	money += 1
print(ans)


(A, B) = map(int, input().split())
p = 0.08
a = 0 - -A // p
b = (A + 1) // p
c = B * 10
d = c + 10
print([int(max(a, c)), -1][(d <= a) | (b <= c)])


(a, b) = map(int, input().split())
i = 0
x = int(a / 0.08)
while True:
	if int((x + i) * 0.1) == b and int((x + i) * 0.08) == a:
		ans = int(x + i)
		break
	elif int((x + i) * 0.1) > b:
		ans = '-1'
		break
	else:
		i += 1
print(ans)


(a, b) = map(int, input().split())
for x in range(1, 2000):
	if int(x * 0.08) == a and int(x * 0.1) == b:
		print(x)
		exit(0)
print(-1)


(A, B) = map(int, input().split())
for i in range(4 ** 6):
	if int(i * 0.08) == A and int(i * 0.1) == B:
		print(i)
		break
else:
	print(-1)


(a, b) = map(int, input().split())
res = -1
for i in range(1010):
	if int(i * 0.08) == a and int(i * 0.1) == b:
		res = i
		break
print(res)


(a, b) = map(int, input().split())
for i in range(2000):
	if int(i * 2 / 25) == a and int(i / 10) == b:
		print(i)
		exit()
print('-1')


def main():
	(A, B) = tuple([int(_x) for _x in input().split()])
	for m in range(2000):
		if m * 108 // 100 - m == A and m * 110 // 100 - m == B:
			print(m)
			return
	print(-1)
main()


A = [0] * 1010
B = [0] * 1010
for i in range(1, 1010):
	A[i] = int(i * 0.08)
	B[i] = int(i * 0.1)
(x, y) = map(int, input().split())
X = [s for (s, t) in enumerate(A) if t == x]
Y = [s for (s, t) in enumerate(B) if t == y]
for i in X:
	if i in Y:
		print(i)
		return
print(-1)


(A, B) = map(int, input().split())
r = -1
for i in range(1001):
	if i * 8 // 100 == A and i * 10 // 100 == B:
		r = i
		break
print(r)


(a, b) = map(int, input().split())
x = []
for i in range(1250):
	if i * 0.08 // 1 == a and i * 0.1 // 1 == b:
		print(i)
		exit()
else:
	print(-1)


import math
import sys
(a, b) = map(int, input().split())
for i in range(10001):
	if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
		print(i)
		return
print('-1')


(A, B) = map(int, input().split())
k = -1
for i in range(10000):
	if int(i * 0.08) == A and int(i * 0.1) == B:
		k = i
		break
print(k)


(A, B) = map(int, input().split())
for N in range(10000):
	if int(N * 0.08) == A and int(N * 0.1) == B:
		print(N)
		break
else:
	print(-1)


(A, B) = map(int, input().split())
print([-1, (c := (-min(-A * 50 // 4, -B * 10)))][(A + 1) * 50 // 4 > c < B * 10 + 10])


(a, b) = map(int, input().split())
from math import ceil as c
(l, r) = (max(c(a / 0.08), b * 10), min(c(-~a / 0.08), -~b * 10))
print([-1, l][l < r])


(A, B) = map(int, input().split())
for i in range(1500):
	if (i * 2 // 25 == A) * (i // 10 == B):
		print(i)
		return
print(-1)


(A, B) = map(int, input().split())
T = max(25 * A, 20 * B)
if 25 * A >= 20 * (B + 1) or 25 * (A + 1) <= 20 * B:
	print(-1)
else:
	print(T // 2 + T % 2)


(A, B) = map(int, input().split())
b = 10 * B
if b * 2 // 25 == A:
	print(b)
elif (b + 9) * 2 // 25 == A:
	if A % 2 == 0:
		print(A * 25 // 2)
	else:
		print((A * 25 + 1) // 2)
else:
	print(-1)


import math
(a, b) = map(int, input().split())
for i in range(1, 10000):
	if int(i * 0.08) == a and int(i * 0.1) == b:
		print(i)
		exit()
print(-1)


import math
(a, b) = map(int, input().split())
for i in range(1500):
	if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
		print(i)
		break
else:
	print(-1)


(a, b) = list(map(int, input().split()))
ans = -1
for v in range(100 * 10 + 100):
	t8 = int(v * 0.08)
	t10 = int(v * 0.1)
	if t8 > a or t10 > b:
		break
	if t8 == a and t10 == b:
		ans = v
		break
print(ans)


import math
(a, b) = map(int, input().split())
ast = math.ceil(a * 12.5)
aend = math.ceil((a + 1) * 12.5) - 1
bst = b * 10
bend = (b + 1) * 10 - 1
flag = 0
for i in range(bst, bend + 1):
	if ast <= i <= aend:
		print(i)
		flag = 1
		break
if flag == 0:
	print(-1)


(a, b) = map(int, input().split())
l = max(a * 25 + 1 >> 1, b * 10)
print(l * (~a / 0.08 < -l > ~b * 10) or -1)


(A, B) = map(int, input().split())
for x in range(10 * B, 10 * B + 10):
	if A * 100 / 8 <= x < A * 100 / 8 + 100 / 8:
		print(x)
		exit()
print('-1')


(a, b) = map(int, input().split())
c = 0
if 100 * a % 8 == 0:
	w = 100 * a // 8
else:
	w = 100 * a // 8 + 1
if 100 * (a + 1) % 8 == 0:
	s = 100 * (a + 1) // 8 - 1
else:
	s = 100 * (a + 1) // 8
for i in range(w, s + 1):
	if i // 10 == b:
		print(i)
		c += 1
		break
	else:
		pass
if c == 0:
	print(-1)
else:
	pass


def N():
	return int(input())

def L():
	return list(map(int, input().split()))

def NL(n):
	return [list(map(int, input().split())) for i in range(n)]
mod = pow(10, 9) + 7
import sys
import math
import collections
(a, b) = L()
for i in range(10, 1250):
	if int(i * 0.08) == a and int(i * 0.1) == b:
		print(i)
		return
print(-1)


(a, b) = map(int, input().split())
ans = -1
for i in range(1300):
	if int(i * 2 / 25) == a and int(i / 10) == b:
		ans = i
		break
print(ans)


(A, B) = map(int, input().split())
l = []
for i in range(1, 10000):
	a = i * 0.08
	b = i * 0.1
	if a > A + 1 and b > B + 1:
		break
	elif A <= a < A + 1 and B <= b < B + 1:
		l.append(i)
if len(l) == 0:
	print(-1)
else:
	print(min(l))


(a, b) = map(int, input().split())
a *= 25
b *= 10
r = max((a + 1) // 2, b)
print((-1, r)[r < min((a + 26) // 2, b + 10)])


def resolve():
	(a, b) = map(int, input().split())
	for i in range(20100):
		ans = '-1'
		if i * 0.08 // 1 == a and i * 0.1 // 1 == b:
			ans = i
			break
	print(ans)
resolve()


def i_input():
	return int(input())

def i_map():
	return map(int, input().split())

def i_list():
	return list(map(int, input().split()))

def i_row(N):
	return [int(input()) for _ in range(N)]

def i_row_list(N):
	return [list(map(int, input().split())) for _ in range(N)]
(a, b) = i_map()
ans = -1
for i in range(1, 2000):
	if i * 8 // 100 == a and i // 10 == b:
		ans = i
		break
print(ans)


(A, B) = map(int, input().split())
for x in range(1, 10001):
	if 0.1 * x // 1 == B and 0.08 * x // 1 == A:
		print(x)
		exit(0)
print(-1)


(a, b) = map(int, input().split())
r = -1
for i in range(1001):
	if i * 8 // 100 == a and i * 10 // 100 == b:
		r = i
		break
print(r)


(A, B) = map(int, input().split())
x = -1
for n in range(2000):
	if int(0.08 * n) == A and int(0.1 * n) == B:
		x = n
		break
print(x)


(a, b) = map(int, input().split())
ans = -1
for x in range(b * 10, (b + 1) * 10):
	if a <= x * 0.08 < a + 1:
		ans = x
		break
print(ans)


import math, sys
(A, B) = map(int, input().split())
for price in range(1, 100000):
	if math.floor(price * 0.08) == A and math.floor(price * 0.1) == B:
		print(price)
		return
print(-1)


import sys
import math
from collections import defaultdict, deque, Counter
from copy import deepcopy
from bisect import bisect, bisect_right, bisect_left
from heapq import heapify, heappop, heappush
input = sys.stdin.readline

def RD():
	return input().rstrip()

def F():
	return float(input().rstrip())

def I():
	return int(input().rstrip())

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

def MF():
	return map(float, input().split())

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

def TI():
	return tuple(map(int, input().split()))

def LF():
	return list(map(float, input().split()))

def Init(H, W, num):
	return [[num for i in range(W)] for j in range(H)]

def main():
	(A, B) = MI()
	B1 = B * 10
	while True:
		if B1 * 0.1 >= B + 1:
			break
		elif B1 * 0.08 >= A + 1:
			break
		elif math.floor(B1 * 0.08) == A:
			print(B1)
			return
		B1 += 1
	print(-1)

def __starting_point():
	main()
__starting_point()


(a, b) = [int(i) for i in input().split()]
idx = 0
rangein = False
while True:
	aa = int(idx * 0.08)
	bb = int(idx * 0.1)
	if aa == a and bb == b:
		print(idx)
		return
	elif aa == a or bb == b:
		rangein = True
	elif rangein and aa != a and (bb != b):
		print(-1)
		return
	idx += 1


(A, B) = map(int, input().split())
flag = True
for i in range(1, 1010):
	if int(i * 0.08) == A and int(i * 0.1) == B:
		print(i)
		flag = False
		break
if flag:
	print(-1)


(A, B) = map(int, input().split())
for i in range(1, 10101):
	if int(i * 0.08) == A and int(i * 0.1) == B:
		print(i)
		exit(0)
else:
	print(-1)


(a, b) = map(int, input().split())
for i in range(10001):
	if i * 8 // 100 == a and i * 10 // 100 == b:
		print(i)
		return
print(-1)


import math
(a, b) = map(int, input().split())
ans = -1
for i in range(1, 1011):
	if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
		print(i)
		return
print(ans)


(A, B) = map(int, input().split())
ans = max((A * 100 - 1) // 8 + 1, B * 10)
if ans >= min(((A + 1) * 100 - 1) // 8 + 1, (B + 1) * 10):
	print(-1)
else:
	print(ans)


(a, b) = map(int, input().split())
if max(25 * a, 20 * b) >= min(25 * (a + 1), 20 * (b + 1)):
	ans = -1
else:
	ans = (max(25 * a, 20 * b) + 1) // 2
print(ans)


def __starting_point():
	(A, B) = list(map(int, input().split()))
	ans = -1
	while ans * 0.08 < A or ans * 0.1 < B:
		ans += 1
	if int(ans * 0.08) == A and int(ans * 0.1) == B:
		print(ans)
	else:
		print('-1')
__starting_point()


(a, b) = map(int, input().split())
r = [i for i in range(1, 1010) if i * 0.08 // 1 == a and i * 0.1 // 1 == b]
print(r[0] if r else -1)


from math import ceil
(A, B) = map(int, input().split())
min8 = ceil(A * 12.5)
max8 = int((A + 1) * 12.5 - 0.001)
min10 = ceil(B * 10)
max10 = int((B + 1) * 10 - 0.001)
if max8 < min10 or max10 < min8:
	print(-1)
else:
	print(max(min8, min10))


(a, b) = map(int, input().split())
for i in range(10 ** 5):
	if i * 2 // 25 == a and i // 10 == b:
		print(i)
		break
else:
	print(-1)


import sys
input = sys.stdin.readline

def main():
	numbers = []
	(a, b) = map(int, input().split())
	tmp1 = int(a / 0.08)
	tmp2 = int(b / 0.1)
	ans = []
	for i in range(min(tmp1, tmp2), max(tmp1, tmp2) + 2):
		if int(i * 0.08) == a and int(i * 0.1) == b:
			ans.append(i)
	if len(ans) > 0:
		print(min(ans))
	else:
		print('-1')

def __starting_point():
	main()
__starting_point()