How do babies know their friends and foes?