Sort problems by line numerically