import math

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





def calc_a(n):

    return n // 0.08





def calc_b(n):

    return n / 0.1





estimate = int(min(calc_a(a), calc_b(b)))

for i in range(estimate, estimate*2):

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

        print(i)

        exit()



print((-1))
import math

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



for i in range(1, 1250):

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

        print(i)

        exit()

else:

    print((-1))
import math

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


def calc_a(n):
    return n // 0.08


def calc_b(n):
    return n / 0.1


estimate = int(min(calc_a(a), calc_b(b)))
for i in range(estimate, estimate * 2):
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        print(i)
        exit()
print((-1))

import math

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

- - -def calc_a(n): -    return n // 0.08 - - -def calc_b(n): -    return n / 0.1 - - -estimate = int(min(calc_a(a), calc_b(b))) -for i in range(estimate, estimate * 2): +for i in range(1, 1250): -print((-1)) +else: +    print((-1))