POJ#1974 SORT(sort twice for x and y) NOTE:be careful of empty rows/cols. Rank:10476