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

for i in range(1, 10001):

    if int(i*0.08) == A and int(i*0.1) == B:

        print(i)

        break

else:

    print((-1))
import sys

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

for i in range(1,1251):

  C_8 = int(i*0.08)

  C_10 = int(i*0.1)

  if C_8 == A and C_10 == B:

    print(i)

    sys.exit()



print((-1))
A, B = list(map(int, input().split()))
for i in range(1, 10001):
    if int(i * 0.08) == A and int(i * 0.1) == B:
        print(i)
        break
else:
    print((-1))

import sys

A, B = list(map(int, input().split()))
for i in range(1, 1251):
    C_8 = int(i * 0.08)
    C_10 = int(i * 0.1)
    if C_8 == A and C_10 == B:
        print(i)
        sys.exit()
print((-1))

+import sys + -for i in range(1, 10001): -    if int(i * 0.08) == A and int(i * 0.1) == B: +for i in range(1, 1251): +    C_8 = int(i * 0.08) +    C_10 = int(i * 0.1) +    if C_8 == A and C_10 == B: -        break -else: -    print((-1)) +        sys.exit() +print((-1))