There's another new game in town: Tapping the Unknowing Poor for Charity (TUPC). You've been selected to write a program to help TUPC keep track of what is happening. This lottery is similar to other lotteries in that the contestants pick six numbers between 1 and 53 inclusive. Unlike a typical lottery, however, TUPC will be drawing multiple winning combinations. Your job is to go through the list of winning combinations and determine if anyone purchased a ticket for that set of values. Note that order doesn't matter, so if Alice purchases 5 1 3 4 2 6 and the winning combination is 1 2 3 4 5 6, TUPC considers her a winner.
The input will be a series of purchased tickets followed by a series
of winning combinations. Both series will be terminated by a line with
all zeros (i.e., 0 0 0 0 0 0). Each ticket and winning
combination will be on a separate input line.
For each winning combination, your program will output a line with the
word Yes if a matching ticket has been purchased, otherwise
your program will output a line with the word No.
| Input | Output | ||
|
|