n = gets.to_i for i in 1..n fact *= i end fans = fact % ((10 ** 9) + 7) print("1\n") print(fans, "\n") print(n, "\n")