In order to test my understanding of problem statement.
problem link:- link text
6 3
16 24 60
498 861 589
14 24 62
72 557 819
16 15 69
435 779 232
1 9 19
1 2 3
9 99 999
9 9 9
7 8 9
3 2 5
Output :-
5 4 2 6 1 3
Is this correct or im missing something??