import fractions

import sys

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



for i in range(1,1009):

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

        print(i)

        sys.exit()

print((-1))
from math import floor

def myAnswer(A:int,B:int) -> int:

   price = 1

   while True:

      if(floor(price*0.08)==A and floor(price*0.1)==B):

         return price

      elif(floor(price*0.08)>A or floor(price*0.1)>B):

         return -1

      else:

         price+=1

   



def modelAnswer():

   tmp=1

def main():

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

   print((myAnswer(A,B)))



if __name__ == '__main__':

   main()
import fractions
import sys

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

from math import floor


def myAnswer(A: int, B: int) -> int:
    price = 1
    while True:
        if floor(price * 0.08) == A and floor(price * 0.1) == B:
            return price
        elif floor(price * 0.08) > A or floor(price * 0.1) > B:
            return -1
        else:
            price += 1


def modelAnswer():
    tmp = 1


def main():
    A, B = list(map(int, input().split()))
    print((myAnswer(A, B)))


if __name__ == "__main__":
    main()

-import fractions -import sys +from math import floor -A, B = list(map(int, input().split())) -for i in range(1, 1009): -    if int(i * 0.08) == A and int(i * 0.1) == B: -        print(i) -        sys.exit() -print((-1)) + +def myAnswer(A: int, B: int) -> int: +    price = 1 +    while True: +        if floor(price * 0.08) == A and floor(price * 0.1) == B: +            return price +        elif floor(price * 0.08) > A or floor(price * 0.1) > B: +            return -1 +        else: +            price += 1 + + +def modelAnswer(): +    tmp = 1 + + +def main(): +    A, B = list(map(int, input().split())) +    print((myAnswer(A, B))) + + +if __name__ == "__main__": +    main()