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