FreeCell solitaire is mostly about sorting, just like computer science. The goal is to sort a deck of cards under a fairly convoluted set of rules.
The rules are these. A shuffled deck is laid out in eight stacks. Only the topmost card of a stack may be moved. A card of value v may be moved onto another stack only if that stack is empty, or if its topmost card has the opposite color and value v+1. For instance, the three of hearts may be moved on top of the four of clubs. You also have four free cells, empty at the start. Each free cell holds at most one card, and that card moves under the same rules as a stack card.
Figure H.1 shows a few legal moves.

Figure H.1: legal moves for the three of hearts and the six of clubs
Most FreeCell computer games let you move a pile of cards at once, provided there are enough empty cells and empty stacks to reach the same position by moving the cards one at a time. In the figure above, the whole pile with 5, 4 and 3 can be moved onto the six of spades by parking 3 and 4 in free cells and on the empty stack.
You want to move a sorted pile of K cards from one stack onto the top of another stack. The destination stack is not empty, and its topmost card has the right color and value. Ignore every other non-empty stack, because otherwise you would have to account for the color and value of the topmost card of each one, and that gets too complicated.
Even with those stacks ignored, you still have N free cells and M empty stacks. Is the move possible?
The input holds several test cases. Each test case is one line with three integers N, M and K separated by spaces. N is the number of free cells, M is the number of empty stacks, and K is the size of the pile you are moving. This is a generalized form of FreeCell, so 0≤N,M≤5 and 0≤K≤100. The input runs to the end of file.
For each test case, print yes on its own line if a pile of K cards can be moved using N free cells and M empty stacks, and no otherwise.