2006 Pontiac vibe

The fan for the ac and heater is only working intermittently. We changed the cabin air filter. Did not help. Any suggestions?