i and j sorting 600×600