import math

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

for n in range(1, 20000):

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

    break

    

if n != 19999:

  print(n)

else:

  print((-1))
import math

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

for n in range(1, 1010):

  aa, bb = math.floor(n*0.08), math.floor(n*0.1)

  if aa == a and bb == b:

    print(n)

    exit()   

print((-1))
import math

a, b = list(map(int, input().split()))
for n in range(1, 20000):
    if math.floor(n * 0.08) == a and math.floor(n * 0.1) == b:
        break
if n != 19999:
    print(n)
else:
    print((-1))

import math

a, b = list(map(int, input().split()))
for n in range(1, 1010):
    aa, bb = math.floor(n * 0.08), math.floor(n * 0.1)
    if aa == a and bb == b:
        print(n)
        exit()
print((-1))

-for n in range(1, 20000): -    if math.floor(n * 0.08) == a and math.floor(n * 0.1) == b: -        break -if n != 19999: -    print(n) -else: -    print((-1)) +for n in range(1, 1010): +    aa, bb = math.floor(n * 0.08), math.floor(n * 0.1) +    if aa == a and bb == b: +        print(n) +        exit() +print((-1))