   program abc158c
   implicit none
   integer::A,B,i,x=0
   real,parameter::eps=0.0000001

      read *,A,B
      do i=1000,1,-1
         if(int((0.08+eps)*i)==A) then
            if(int((0.10+eps)*i)==B) then
               x=i
            end if
         end if
      end do

      if (x/=0) then
         print *,x
      else
         print *,'-1'
      end if
      stop

   end program abc158c