Definition: Given a negotiation between two participants, answer 'Yes' if both participants agree to the deal, otherwise answer 'No'.
Input: THEM: ill giv eyou 3 books  YOU: i'll take hats. you can have the rest.  THEM: no sorry i need the hats  YOU: i can do 1 hat and 3 books.  THEM: ill give you 1 hat and 2 books  YOU: i can do 1 hat and 3 books or 1 hat, 2 books and the ball. same points for me either way.  THEM: same points for you but not for me. you get 1 hat and 2 books  YOU: then no deal. that's only 5 points. hats are 3 for me. i those are the only deals i can offer.  THEM: you can have 1 hat and 3 books.
Output:
Yes