Design of the LHAASO detectors