import math

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

X1 = math.ceil(A / 0.08)

X1max = (A+1) / 0.08

X2 = math.ceil(B / 0.10)

X2max = (B+1) / 0.10

#print (X1,X1max,X2,X2max)



X = max(X1,X2)

if X2max <= X1 or X1max <= X2:

    print((-1))

else:

    print(X)
import math

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

mark = 0

for i in range (1,1009):

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

        print(i)

        mark = 1

        break

if mark == 0:

    print((-1))

import math

A, B = list(map(int, input().split()))
X1 = math.ceil(A / 0.08)
X1max = (A + 1) / 0.08
X2 = math.ceil(B / 0.10)
X2max = (B + 1) / 0.10
# print (X1,X1max,X2,X2max)
X = max(X1, X2)
if X2max <= X1 or X1max <= X2:
    print((-1))
else:
    print(X)

import math

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

-X1 = math.ceil(A / 0.08) -X1max = (A + 1) / 0.08 -X2 = math.ceil(B / 0.10) -X2max = (B + 1) / 0.10 -# print (X1,X1max,X2,X2max) -X = max(X1, X2) -if X2max <= X1 or X1max <= X2: +mark = 0 +for i in range(1, 1009): +    if A == math.floor(i * 0.08) and B == math.floor(i * 0.1): +        print(i) +        mark = 1 +        break +if mark == 0: -else: -    print(X)