Nah, come on, man. Some straight like you, ***** ***** ** *** *** all a sudden at age, what, 60, he's just gonna break bad?
- Jesse, Breaking Bad
Walter White finally broke bad and finished building his drug empire.
There are of them in the business right now: Walt, Jesse, Mike, Saul, and Todd. They divided Albuquerque into cells, and they made dollars in the area on the intersection of the -th row and -th column.
They want to choose cells to collect money from. To not cause Hank's suspicion, they want exactly one selected cell in each row and in each column. If the total money made in these cells is , they will split it evenly among the five of them, and will donate the remaining dollars to Ted Beneke.
Find all possible amounts of dollars that could have been donated to Ted Beneke.
Input data
The first line contains a single positive integer () - the size of the grid.
The next lines contain integers () - the number of dollars made in the cell at the intersection of the -th row and -th column.
Output data
Output a string of exactly 5 letters Y
or N
. If it's possible to get for , the -th letter of the string must be Y
, otherwise N
.
Example 1
stdin
2
0 4
4 0
stdout
YNNYN
Example 2
stdin
2
1 1
1 1
stdout
NNYNN