a, b = list(map(int, input().split()))

ans = -1

for i in range(100000):

    if int(i*0.08) == a and int(i*0.1) ==b:

        ans = i

        break

print(ans)
a, b = list(map(int, input().split()))

ans = -1



for money in range(pow(10, 4)):

    if int(money*0.08) == a and int(money*0.1) == b:

        ans = money

        break



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

a, b = list(map(int, input().split()))
ans = -1
for money in range(pow(10, 4)):
    if int(money * 0.08) == a and int(money * 0.1) == b:
        ans = money
        break
print(ans)

-for i in range(100000): -    if int(i * 0.08) == a and int(i * 0.1) == b: -        ans = i +for money in range(pow(10, 4)): +    if int(money * 0.08) == a and int(money * 0.1) == b: +        ans = money