Deal or No Deal is a television game show. In this version of the game there are 10 sealed briefcases, each hiding one of 10 possible dollar amounts:
| Case number | Amount |
|---|---|
| 1 | $100 |
| 2 | $500 |
| 3 | $1,000 |
| 4 | $5,000 |
| 5 | $10,000 |
| 6 | $25,000 |
| 7 | $50,000 |
| 8 | $100,000 |
| 9 | $500,000 |
| 10 | $1,000,000 |
Before the game starts, the contestant chooses one briefcase to keep as their own. During the game the contestant opens some of the other briefcases, revealing the amounts inside them; each revealed amount is then removed from the game.
At some point the contestant stops opening briefcases, and a "Banker" offers cash in exchange for whatever might be inside the contestant's own briefcase. The contestant is then asked: "Deal or No Deal?"
Write a program that helps the contestant decide. Compute the average of the amounts still in play — that is, every unopened briefcase, including the contestant's own — and compare it with the Banker's offer. If the offer is higher than the average, the contestant should take the deal; otherwise they should say no deal.
The first value is an integer $n$ ($1 \le n < 10$) giving how many briefcases have been opened so far. It is followed by $n$ integers between 1 and 10, the case numbers whose amounts have been eliminated, and finally the Banker's offer. The values may be separated by spaces or newlines. For instance, 3 2 5 10 300 means that three briefcases were opened — the ones numbered 2, 5, and 10 (holding $500, $10,000, and $1,000,000) — and the Banker's offer is $300. No case number is repeated, and the Banker's offer is an integer greater than 10.
Print exactly one line: deal if the offer is higher than the average of the remaining amounts, or no deal otherwise.