Fish's nostrils are in the mouth, and ears are just inner ears. They are buried in the skull and are not open outside. They rely on skulls to transmit sound.
The olfactory organ of octopus is a small depression behind the eyes. Octopus's hearing is not clear, as if the hearing mechanism of cephalopods has never been clarified, which only proves that they can feel sound.