Fred's Lotto Tickets

Time limit1sMemory limit128 MB

Problem

Fred likes to play the lotto, and whenever he does he buys lots of tickets. Each ticket has $6$ distinct integers in the range from $1$ to $49$ inclusive. Fred likes his tickets to "cover all the bases": he means that within a set of tickets, every number from $1$ to $49$ should appear at least once on some ticket. Write a program that decides whether a set of tickets covers every number from $1$ to $49$.

Input

The input consists of several test cases.

Each test case starts with an integer $N$ ($1 \le N \le 100$), the number of tickets Fred purchased. The next $N$ lines each contain one ticket. Each ticket has exactly $6$ integers, all in the range from $1$ to $49$ inclusive. No ticket contains a duplicate number, but the numbers on a ticket may appear in any order.

The input ends with a line containing only a $0$.

Output

For each test case, print one line. Print Yes if every number from $1$ to $49$ inclusive appears on some ticket in the set, and No otherwise. Print these words exactly as shown, and do not print blank lines between outputs.