program main
  implicit none
  integer :: a, b, i, res
  read (*, *) a, b
  res = -1
  do i = 1, 10000
    if (int(i * 0.08) == a .and. int(i * 0.1) == b) then
      res = i
      exit
    end if
  end do
  write (*, "(i0)") res
end program main
