print the next smallest and the next largest number