import math

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

flag=True

for i in range(10**7):

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

        print(i)

        flag=False

        exit()

if flag:

    print((-1))
import math

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

flag=True

for i in range(10**6):

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

        print(i)

        flag=False

        exit()

if flag:

    print((-1))
import math

a, b = list(map(int, input().split()))
flag = True
for i in range(10**7):
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        print(i)
        flag = False
        exit()
if flag:
    print((-1))

import math

a, b = list(map(int, input().split()))
flag = True
for i in range(10**6):
    if math.floor(i * 0.08) == a and math.floor(i * 0.1) == b:
        print(i)
        flag = False
        exit()
if flag:
    print((-1))

-for i in range(10**7): +for i in range(10**6):