import math



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



A_min = math.ceil(A * 12.5)

A_max = math.ceil((A + 1) * 12.5) - 1



B_min = math.ceil(B * 10)

B_max = math.ceil((B + 1) * 10) - 1

# print(A_min, A_max, B_min, B_max)

candidate = max(A_min, B_min)

if candidate < min(A_max, B_max):

    print(candidate)

else:

    print('-1')

import math



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

for i in range(1, 1001):

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

        print(i)

        exit()

print((-1))

import math

A, B = list(map(int, input().split()))
A_min = math.ceil(A * 12.5)
A_max = math.ceil((A + 1) * 12.5) - 1
B_min = math.ceil(B * 10)
B_max = math.ceil((B + 1) * 10) - 1
# print(A_min, A_max, B_min, B_max)
candidate = max(A_min, B_min)
if candidate < min(A_max, B_max):
    print(candidate)
else:
    print("-1")

import math

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

-A_min = math.ceil(A * 12.5) -A_max = math.ceil((A + 1) * 12.5) - 1 -B_min = math.ceil(B * 10) -B_max = math.ceil((B + 1) * 10) - 1 -# print(A_min, A_max, B_min, B_max) -candidate = max(A_min, B_min) -if candidate < min(A_max, B_max): -    print(candidate) -else: -    print("-1") +for i in range(1, 1001): +    if math.floor(0.08 * i) == A and math.floor(0.1 * i) == B: +        print(i) +        exit() +print((-1))