import sys

input = sys.stdin.readline



def I(): return int(eval(input()))

def MI(): return list(map(int, input().split()))

def LI(): return list(map(int, input().split()))



def main():

    mod=10**9+7

    a,b=MI()

    ans=-1

    for i in range(10000):

        aa=int(i*0.08)

        bb=i//10

        if a==aa and b==bb:

            ans=i

            break

    print(ans)



main()

import sys

input = sys.stdin.readline



def I(): return int(eval(input()))

def MI(): return list(map(int, input().split()))

def LI(): return list(map(int, input().split()))



def main():

    mod=10**9+7

    ans=-1

    

    A,B=MI()

    for i in range(10000):

        a=int(i*0.08)

        b=int(i*0.1)

        

        if a==A and b==B:

            ans=i

            break

        

    print(ans)





main()

import sys

input = sys.stdin.readline


def I():
    return int(eval(input()))


def MI():
    return list(map(int, input().split()))


def LI():
    return list(map(int, input().split()))


def main():
    mod = 10**9 + 7
    a, b = MI()
    ans = -1
    for i in range(10000):
        aa = int(i * 0.08)
        bb = i // 10
        if a == aa and b == bb:
            ans = i
            break
    print(ans)


main()

import sys

input = sys.stdin.readline


def I():
    return int(eval(input()))


def MI():
    return list(map(int, input().split()))


def LI():
    return list(map(int, input().split()))


def main():
    mod = 10**9 + 7
    ans = -1
    A, B = MI()
    for i in range(10000):
        a = int(i * 0.08)
        b = int(i * 0.1)
        if a == A and b == B:
            ans = i
            break
    print(ans)


main()

-    a, b = MI() +    A, B = MI() -        aa = int(i * 0.08) -        bb = i // 10 -        if a == aa and b == bb: +        a = int(i * 0.08) +        b = int(i * 0.1) +        if a == A and b == B: