def main():

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

    for x in range(1,10001):

        x_a = int(x * 0.08)

        x_b = int(x * 0.1)

        if x_a == a and x_b == b:

            print(x)

            return

    print((-1))

if __name__=='__main__':

    main()

import math

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



for i in range(1,2000):

    tax8 = math.floor(i*0.08)

    tax1 = math.floor(i*0.1)

    if a == tax8 and b == tax1:

        print(i)

        exit()

print((-1))

def main():
    a, b = list(map(int, input().split()))
    for x in range(1, 10001):
        x_a = int(x * 0.08)
        x_b = int(x * 0.1)
        if x_a == a and x_b == b:
            print(x)
            return
    print((-1))


if __name__ == "__main__":
    main()

import math

a, b = list(map(int, input().split()))
for i in range(1, 2000):
    tax8 = math.floor(i * 0.08)
    tax1 = math.floor(i * 0.1)
    if a == tax8 and b == tax1:
        print(i)
        exit()
print((-1))

-def main(): -    a, b = list(map(int, input().split())) -    for x in range(1, 10001): -        x_a = int(x * 0.08) -        x_b = int(x * 0.1) -        if x_a == a and x_b == b: -            print(x) -            return -    print((-1)) +import math - -if __name__ == "__main__": -    main() +a, b = list(map(int, input().split())) +for i in range(1, 2000): +    tax8 = math.floor(i * 0.08) +    tax1 = math.floor(i * 0.1) +    if a == tax8 and b == tax1: +        print(i) +        exit() +print((-1))