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

ans = -1

for i in range(1,2000):

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

        ans = i

        break

print(ans)
import math

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

Xa = math.ceil(A/0.08)

xa = int((A+1)/0.08)

Xb = math.ceil(B/0.1)

xb = int((B+1)/0.1)

ans = -1

for i in range(Xa,xa):

    if Xb <= i < xb:

        ans = i

        break

print(ans)

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

import math

A, B = list(map(int, input().split()))
Xa = math.ceil(A / 0.08)
xa = int((A + 1) / 0.08)
Xb = math.ceil(B / 0.1)
xb = int((B + 1) / 0.1)
ans = -1
for i in range(Xa, xa):
    if Xb <= i < xb:
        ans = i
        break
print(ans)

+import math + +Xa = math.ceil(A / 0.08) +xa = int((A + 1) / 0.08) +Xb = math.ceil(B / 0.1) +xb = int((B + 1) / 0.1) -for i in range(1, 2000): -    if int(0.08 * i) == A and int(0.1 * i) == B: +for i in range(Xa, xa): +    if Xb <= i < xb: