Input: Sentence 1: The man nodded under his three-cornered hat. Sentence 2: The man wore a hat.
Output: 

 yes