#Lutece0810. Food Delivery

Food Delivery

Migrated from Lutece 810 Food Delivery

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

Recently, people who love take-out foods increased sharply, especially in UESTC ACM team. And the restaurant who would like deliver the foods has increased to MM.

Today NN students in UESTC ACM team wants take-out foods. Each student would like to eat foods from restaurant aia_i or bib_i. However, the restaurant will deliver the foods if and only if the number of students that ordered its foods is not less than 22.

Now we want to know whether there is a way to satisfied everyone's need.

Input

The first line of the input contains an integer N,MN, M (1N100,1M501\leq N\leq 100, 1\leq M\leq 50), as described above.

The next NN lines contain 22 integers ai,bia_i, b_i (1ai,biM1\leq a_i, b_i\leq M and aibia_i\neq b_i) , indicating the first and the second restaurant's food the ithith student wants to have.

Output

Output Yes if there is a way to satisfied everyone, otherwise output No.

Samples

2 2
1 2
1 2
Yes
3 3
1 2
2 3
1 3
No

Resources

the 12th UESTC Programming Contest Final