import math

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



for i in range(1000000):

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

        print(i)

        exit(0)



print((-1))
import math



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



for i in range(1001):

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

        print(i)

        exit(0)



print((-1))
import math

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

import math

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

-for i in range(1000000): +for i in range(1001):