def next_and_previous(number):
    print("The next number for the number", number, "is", number + 1, end="")
    print(".")
    print("The previous number for the number", number, "is", number - 1, end="")
    print(".")


next_and_previous(int(input()))