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: i'd like the hats and ball.  YOU: can't do that. i need two hats and the books.  THEM: how about you take the books and one hat?  YOU: cannot do that. i could do the books, one hat, and the ball.  THEM: can't do that. i need the ball. you can have the books.  YOU: then i need two hats.  THEM: i can't give up two hats. i need two hats myself for any value.  YOU: if you need two hats, then i need the ball.  THEM: can't give up hats and the ball. i can give you the books for sure. i'll take the ball. we need to figure out the hat situation  YOU: i can't give up two hats without getting the ball in return for one of them.  THEM: i can do one hat. i'll take the ball and one hat. you can have the rest.  YOU: deal.  THEM: deal!
Output:
Yes