import math



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



ans = -1



for i in range(1, 1000000):

    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:

        ans = i

        break

print(ans)
import math



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



ans = -1



for i in range(1, 100000):

    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:

        ans = i

        break

print(ans)
import math

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

import math

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

-for i in range(1, 1000000): +for i in range(1, 100000):