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

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)

-ans = -1 -for p in range(1, 20000): -    if p * 8 // 100 == A and p * 10 // 100 == B: -        ans = p -        break -print(ans) +p = max((25 * A + 1) // 2, (20 * B + 1) // 2) +if p * 2 >= min(25 * (A + 1), 20 * (B + 1)): +    p = -1 +print(p)