import math



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





ans = -1



for i in range(1, 1251):

    

    a = int(math.floor(i * 0.08))

    b = int(math.floor(i * 0.1))



    if (a == A and b == B):

        ans = i

        break



print(ans)
# O(1) solution

import math



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



min_A = int(math.ceil(A * 12.5))

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



grp_A = {i for i in range(min_A, max_A + 1)}



min_B = int(math.ceil(B * 10))

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



grp_B = {i for i in range(min_B, max_B + 1)}



ans = grp_A & grp_B



if (len(ans) == 0):

    ans = -1

else:

    ans = min(ans)



print(ans)
import math

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

# O(1) solution
import math

A, B = list(map(int, input().split()))
min_A = int(math.ceil(A * 12.5))
max_A = int(math.ceil((A + 1) * 12.5) - 1)
grp_A = {i for i in range(min_A, max_A + 1)}
min_B = int(math.ceil(B * 10))
max_B = int(math.ceil((B + 1) * 10) - 1)
grp_B = {i for i in range(min_B, max_B + 1)}
ans = grp_A & grp_B
if len(ans) == 0:
    ans = -1
else:
    ans = min(ans)
print(ans)

+# O(1) solution -ans = -1 -for i in range(1, 1251): -    a = int(math.floor(i * 0.08)) -    b = int(math.floor(i * 0.1)) -    if a == A and b == B: -        ans = i -        break +min_A = int(math.ceil(A * 12.5)) +max_A = int(math.ceil((A + 1) * 12.5) - 1) +grp_A = {i for i in range(min_A, max_A + 1)} +min_B = int(math.ceil(B * 10)) +max_B = int(math.ceil((B + 1) * 10) - 1) +grp_B = {i for i in range(min_B, max_B + 1)} +ans = grp_A & grp_B +if len(ans) == 0: +    ans = -1 +else: +    ans = min(ans)