I wanna use a basic way,i mean there\'s no api virtually
Sort by row first and then by column;
the input :
{{4,2},{1,7},{1,2},{1,1},{4,1}}
the ou