from math import floor

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



for i in range(1, 1000000):

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

    print(i)

    exit()

print((-1))
# C - Tax Increase

# https://atcoder.jp/contests/abc158/tasks/abc158_c



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



for x in range(1, 100000):

  if int(x * 0.08) == a and int(x * 0.1) == b:

    print(x)

    exit()



print((-1))
from math import floor

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

# C - Tax Increase
# https://atcoder.jp/contests/abc158/tasks/abc158_c
a, b = list(map(int, input().split()))
for x in range(1, 100000):
    if int(x * 0.08) == a and int(x * 0.1) == b:
        print(x)
        exit()
print((-1))

-from math import floor - +# C - Tax Increase +# https://atcoder.jp/contests/abc158/tasks/abc158_c -for i in range(1, 1000000): -    if floor(i * 0.08) == a and floor(i * 0.1) == b: -        print(i) +for x in range(1, 100000): +    if int(x * 0.08) == a and int(x * 0.1) == b: +        print(x)