Lottery

The lottery BWS is played annually. In this lottery N people bet choosing K numbers each. In a formal way, we can say that Bij is the j-th value bet by the i-th person. Then the organizers choose K positive integers. The chosen numbers are called W1, W2, ..., WK. The winners are calculated as followed: • A non-empty subset is chosen randomly from the N participants; in other words, some participants are luckily chosen. • For each person in this subset the value S1 is calculated, the sum of all the first numbers bet by them, that is, the sum of the Bi1 where i is the index of each chosen person. In the same way the values S2, ..., SK are calculated. • A parity test between Wj and Sj is performed; in other words, it is verified if the parity (if a number is pair or odd) matches between W1 and S1, W2 and S2, and so on until WK and SK. • If all parities match, then the people in this subset are considered the winners! The organizers want to know: is it possible to pick the numbers W1, W2, ..., WK so that there is no subset of winning participants? Input The input contains several test cases. The first line of a test case contains the numbers N (1 ≤ N ≤ 30000) and K (3 ≤ K ≤ 50), which represent the number of participants and the quantity of numbers bet by each person, respectively. The participants bet with integer numbers between 1 and 109, inclusive. Each of the next N lines contains K numbers representing the bet of each person, one person per line. Output For each test case in the input you must output a single line, containing one letter: ‘S’ in case it is possible or ‘N’ otherwise. Sample Input 23 123 567 33 321 654 444 43 947 444 272 221

2/2 Sample Output S S N