def factorial(n): ret = 1 for i in range(n): ret = ret*(i+1)%1000000007 return ret def main(): n = int( input() ) print(1) print(factorial(n)) print(n) main()