Input: Sentence 1: You had worked that out, had you?  Sentence 2: You worked that out, right?
Output: 

 yes