Dissociable roles for cortical and subcortical structures in memory retrieval and acquisition