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)





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)





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)

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)

-for i in range(10001): +for i in range(1001):