import sys

A, B = [int(x) for x in input().split()]

for x in range(A*8//100,(B+1)*10):

  if A == x*8//100 and B == x//10:

    print(x)

    sys.exit()

print((-1))
import sys

A, B = [int(x) for x in input().split()]

for x in range(A*100//8,(B+1)*10):

  if A == x*8//100 and B == x//10:

    print(x)

    sys.exit()

print((-1))

import sys

A, B = [int(x) for x in input().split()]
for x in range(A * 8 // 100, (B + 1) * 10):
    if A == x * 8 // 100 and B == x // 10:
        print(x)
        sys.exit()
print((-1))

import sys

A, B = [int(x) for x in input().split()]
for x in range(A * 100 // 8, (B + 1) * 10):
    if A == x * 8 // 100 and B == x // 10:
        print(x)
        sys.exit()
print((-1))

-for x in range(A * 8 // 100, (B + 1) * 10): +for x in range(A * 100 // 8, (B + 1) * 10):