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 all the hats, you can have the rest. YOU: i need at least one of the hats if i am taking the rest THEM: you can have two hats if i get a book and two hats. YOU: i need the ball and a hat or i can not make a deal THEM: so you take the ball and two hats and i take the rest, right? YOU: yes.
Output:
Yes