Input: Head: PersonX invites PersonY to join PersonZ<sep>Tail: to keep things under control
Output: Yes