beecrowd | 1942

# Lottery

By Bruno Junqueira Adami Brazil

Timelimit: 1

The BWS lottery is done annually. In it N people bet by choosing K numbers each. Formally, we can say that Bij is the j-th amount wagered by the i-th person. So the organizers choose positive integers K. The chosen numbers are called W1, W2, ..., WK.

Winners are calculated as follows:

• A non-empty subset of N participants is randomly chosen, in other words, some participants are chosen by pure luck.
• For each person in this subset S1 value is calculated, which is the sum of all first numbers bet by them, that is, the sum of Bi1, where i would be the index of the chosen person. Likewise S2, ..., SK values are calculated.
• It is made a parity test between Sj and Wj, in other words, it is tested whether the parities (if the number is odd or even) match between S1 and W1, W2 and S2, and so on until WK and SK.
• If all parities matches, then this group of persons is declared the winner!

The organizers want to know: can you choose the numbers W1, W2, ..., WK so that there is no winner subset of participants?

## Input

The first line contains the numbers N (1 ≤ N ≤ 104) and K (3 ≤ K ≤ 50), representing the number of participants and the amount of numbers bet per person respectively. People bet on integers greater than 1 and smaller than 50, inclusive. Each of the following N lines contains K numbers, representing the bets of each person, one per line.

## Output

Print 'S' if possible or 'N' otherwise.

 Input Samples Output Samples 2 3 1 2 3 5 6 7 S
 3 3 3 2 1 6 5 4 4 4 4 S
 4 3 9 4 7 4 4 4 2 7 2 2 2 1 N