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

a1 = A/0.08

a2 = (A+1)/0.08

X = []

for i in range(13,1263):

    if a1<=i<a2:

        X.append(i)

b1 = B/0.1

b2 = (B+1)/0.1

x = -1

for y in X:

    if b1<=y<b2:

        x = y

        break

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

flag = 0

for i in range(1,1001):

    if int(i*0.08)==A and int(i*0.1)==B:

        ans = i

        flag = 1

        break

if flag==0:

    print((-1))

else:

    print(ans)
A, B = list(map(int, input().split()))
a1 = A / 0.08
a2 = (A + 1) / 0.08
X = []
for i in range(13, 1263):
    if a1 <= i < a2:
        X.append(i)
b1 = B / 0.1
b2 = (B + 1) / 0.1
x = -1
for y in X:
    if b1 <= y < b2:
        x = y
        break
print(x)

A, B = list(map(int, input().split()))
flag = 0
for i in range(1, 1001):
    if int(i * 0.08) == A and int(i * 0.1) == B:
        ans = i
        flag = 1
        break
if flag == 0:
    print((-1))
else:
    print(ans)

-a1 = A / 0.08 -a2 = (A + 1) / 0.08 -X = [] -for i in range(13, 1263): -    if a1 <= i < a2: -        X.append(i) -b1 = B / 0.1 -b2 = (B + 1) / 0.1 -x = -1 -for y in X: -    if b1 <= y < b2: -        x = y +flag = 0 +for i in range(1, 1001): +    if int(i * 0.08) == A and int(i * 0.1) == B: +        ans = i +        flag = 1 -print(x) +if flag == 0: +    print((-1)) +else: +    print(ans)