program main

  implicit none

  integer :: a, b
  integer :: tmp, i
  
  read(*,*) a, b
  
  tmp = 0 

  do i = 1, 1250 
    if( int( i*0.08 ) == a .and. int( i*0.1 ) == b ) then
      tmp = i
      exit
    else
    end if
  end do
  
  if( tmp == 0 ) then
    print*, "-1"
  else
    print*, tmp
  end if
  
  
end program main
