import java.util.*; import java.io.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); PrintWriter ou = new PrintWriter(System.out); int n = Integer.parseInt(sc.next()); long q = 1; ou.println(q); for(int i = 2 ; i <= n ; i++){ q *= i; q %= (int)Math.pow(10 , 9) + 7; } ou.println(q); ou.println(n); ou.flush(); sc.close(); } }