n = int(input()) mod = 10**9+7 print(1) b = 1 for i in range(1,n+1): b *= i b %= mod print(b) print(n)