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 would like both balls and the book and you can have both hats  YOU: i can not accept that deal if i can have the hats and one ball you can have one ball and the book  THEM: i will let you have the hats if i can have both balls  YOU: i need the balls as well. i was trying to split the difference. can you offer anything else  THEM: ok, how about i get one of each - one book, one hat and one ball?  YOU: that will not work for me. i need at least the hats and one ball... or both balls and the book. those are the only deals i can accept right now  THEM: ok, what about you get both hats and one ball?  YOU: okay that works for me. thank you!  THEM: ok, that leaves me one book and one ball  YOU: that's correct  THEM: deal.
Output:
Yes