Select the greatest 4-digit number