Remove Header and Footer if user is not logged on

Using Hook, is there a way to remove the Header and Footer from the specific page that is trying to access by users, if the current user is not logged on?

function footer_header_remove() {     if(!is_user_logged_in() && is_page('the-page')){        //Remove Header and Footer of "the-page"     } } add_action('???????????', 'footer_header_remove');