#Tax Increase

import math

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

for i in range(10000):

    if a == math.floor(i*0.08) and b == math.floor(i*0.1):

        print(i)

        break

else:

    print((-1))
#Tax Increase

import math

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

for i in range(1251):

    if a == math.floor(i*0.08) and b == math.floor(i*0.1):

        print(i)

        break

else:

    print((-1))
# Tax Increase
import math

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

# Tax Increase
import math

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

-for i in range(10000): +for i in range(1251):