The Segregation and Integration of Distinct Brain Networks and Their Relationship to Cognition