// Arup Guha
// 6/25/2012
// Solution to 2008 Southeast Regional Problem: Fred's Lotto Tickets

import java.util.*;

public class f {

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);

		int numTickets = stdin.nextInt();

		// Go through each batch of tickets.
		while (numTickets != 0) {

			boolean[] freq = new boolean[49];
			Arrays.fill(freq, false);

			// Just fill a frequency array for each number seen.
			for (int i=0; i<6*numTickets; i++) {
				int value = stdin.nextInt();
				freq[value-1] = true;
			}

			// And our result together...
			boolean result = true;
			for (int i=0; i<freq.length; i++) {
				result = result && freq[i];
				if (!result) break;
			}

			// And output.
			if (result)
				System.out.println("Yes");
			else
				System.out.println("No");

			numTickets = stdin.nextInt();
		}
	}
}