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



ans = -1

for i in range(10,12501):

    if int(i*0.08) == a and int(i * 0.1) == b:

        ans = i

        break

        

print(ans)
a,b = list(map(int, input().split()))



import math



if math.ceil((a+1)*12.5) <= math.ceil(b*10) or math.ceil(a*12.5) >= math.ceil((b+1)*10):

    print((-1))

else:

    print((max(math.ceil(a*12.5),math.ceil(b*10))))
a, b = list(map(int, input().split()))
ans = -1
for i in range(10, 12501):
    if int(i * 0.08) == a and int(i * 0.1) == b:
        ans = i
        break
print(ans)

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

if math.ceil((a + 1) * 12.5) <= math.ceil(b * 10) or math.ceil(a * 12.5) >= math.ceil(
    (b + 1) * 10
):
    print((-1))
else:
    print((max(math.ceil(a * 12.5), math.ceil(b * 10))))

-ans = -1 -for i in range(10, 12501): -    if int(i * 0.08) == a and int(i * 0.1) == b: -        ans = i -        break -print(ans) +import math + +if math.ceil((a + 1) * 12.5) <= math.ceil(b * 10) or math.ceil(a * 12.5) >= math.ceil( +    (b + 1) * 10 +): +    print((-1)) +else: +    print((max(math.ceil(a * 12.5), math.ceil(b * 10))))