import math



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



cnt = 0

for i in range(1,100000):

    X = math.floor(i * 0.08)

    Y = math.floor(i * 0.1)

    if A == X and B == Y:

        print(i)

        cnt += 1

        break

        

if cnt == 0:

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



import math

ans = -1

for i in range(10000):

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

        ans=i

        break

print(ans)
import math

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

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

ans = -1
for i in range(10000):
    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B:
        ans = i
        break
print(ans)

+A, B = list(map(int, input().split())) -A, B = list(map(int, input().split())) -cnt = 0 -for i in range(1, 100000): -    X = math.floor(i * 0.08) -    Y = math.floor(i * 0.1) -    if A == X and B == Y: -        print(i) -        cnt += 1 +ans = -1 +for i in range(10000): +    if math.floor(i * 0.08) == A and math.floor(i * 0.1) == B: +        ans = i -if cnt == 0: -    print((-1)) +print(ans)