Yes and gfci protection (see 210.8 for gfci requirements) is not required by code for that set up unless specified by the equipment manufacturer (light and fan installed per instructions/listing and labeling- see 110.3-B)- not a bad idea to do it anyway imo.