import math

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



i = math.floor(a/0.08)

while i < 10001:

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

        print(i)

        break

    i += 1

else:

    print((-1))

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

for price in range(10000):

    if price * 8 // 100 == a and price * 10//100 ==b:

        print(price)

        exit()

else:

    print((-1))
import math

a, b = list(map(int, input().split()))
i = math.floor(a / 0.08)
while i < 10001:
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        print(i)
        break
    i += 1
else:
    print((-1))

a, b = list(map(int, input().split()))
for price in range(10000):
    if price * 8 // 100 == a and price * 10 // 100 == b:
        print(price)
        exit()
else:
    print((-1))

-import math - -i = math.floor(a / 0.08) -while i < 10001: -    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b: -        print(i) -        break -    i += 1 +for price in range(10000): +    if price * 8 // 100 == a and price * 10 // 100 == b: +        print(price) +        exit()