You will be given a definition of a task first, then some input of the task.
Given a negotiation between two participants, answer 'Yes' if both participants agree to the deal, otherwise answer 'No'.

THEM: how about 1 ball, 2 hats and 2 books?  YOU: no, i'll take 2 books and 1 hat.  THEM: how about 1 book and 1 hat, i get the rest.  YOU: no, i'll take 2 hats and 1 book.  THEM: i need a hat. i need one hat, one ball, and one book to make it a deal  YOU: i'll take 2 books and 1 hat.  THEM: fine.
Output:
Yes