Centers and isochronous centers for two classes of generalized seventh and ninth systems