def resolve():

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

    j=-1

    for i in range(1263):

        c = i*0.08//1

        d = i*0.1//1

        if c==a and d==b:

            j=i

            break

    print(j)

resolve()
def resolve():

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

    for i in range(1300):

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

            print(i)

            exit()

    print((-1))

resolve()
def resolve():
    a, b = list(map(int, input().split()))
    j = -1
    for i in range(1263):
        c = i * 0.08 // 1
        d = i * 0.1 // 1
        if c == a and d == b:
            j = i
            break
    print(j)


resolve()

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


resolve()

-    j = -1 -    for i in range(1263): -        c = i * 0.08 // 1 -        d = i * 0.1 // 1 -        if c == a and d == b: -            j = i -            break -    print(j) +    for i in range(1300): +        if int(i * 0.08) == a and int(i * 0.1) == b: +            print(i) +            exit() +    print((-1))