import math

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

for i in range(10000):

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

        print(i)

        exit()

print((-1))
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:

        print(i)

        exit()

print((-1))
import math

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

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:
        print(i)
        exit()
print((-1))

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