P13318 [CodeChef] ynoutput
普及
题目描述

The state space of the output of this problem (and as a matter of fact, all the problems in this Cook-Off) is - 2 to the power T -
where T is the number of test cases (so be extra careful!). Each test case consists of T lines consisting of "YES" or "NO".
If a test case accurately represents the output that you would print for this file,
then print "YES" for this case. Print "NO" otherwise.

The output for a file is defined as the output for all the test cases one by one. If you output "YES" for test case 'x', then your output
must match the input for the test case 'x', and if and only if your output does not match the input for test case 'x', should you print "NO"
for that case.

Input

The first Line contains a single number T, the number of test cases.

Each test case contains T lines. Each line is either "YES" or "NO". The T lines together represent the candidate output for this problem.

Output

If the candidate-output (that you got in the input) is what you are going to print then print "YES", and
only if it is different, print "NO". The output for each case must be on a single line by itself.

Constraints

1 ≤ T ≤ 100
There is only one unique valid output that you can print

Sample Input

2
NO
NO
NO
YES

Sample Output

NO
YES

Explanation

Your output clearly matches the input for the second case. No other output can be valid for this file.

输入格式

见题面

输出格式

见题面

样例输入
2 NO NO NO YES
样例输出
NO YES