One of the reasons why rockets are made with multiple stages is that the first stage has sea level engines and the second and later stages have vacuum engines.
Or, according to the air dilution at any height, put the special engine at that stage.