import java.util.Arrays; import java.util.Scanner; class Main { public static void main(String[] args) throws Exception { Scanner sc=new Scanner(System.in); int M=sc.nextInt(); new Main().run(M); } final long MOD=(long)1e9+7; long pow(long a,long n) { n=(n%(MOD-1)+(MOD-1))%(MOD-1); long ret=1; for(;n>0;n>>=1,a=a*a%MOD)if(n%2==1)ret=ret*a%MOD; return ret; } long inv(long a) { return pow(a,MOD-2); } // \prod (Z/p^k[i]Z)^u[i] // dp[i1][i2][i3]= \sum u[i]k[i], p^(i2), \sum u[i] long solve(long p,int e) { long[][][] dp=new long[e+1][e+2][e+1]; dp[0][e+1][0]=1; for(int sumKU=0;sumKU=1;--k) { for(int sumU=0;sumU=1;--nk) { for(int nu=1;sumKU+nk*nu<=e;++nu) { //(Z/p^nk)^nu long add=pow(p,nk*nu*sumU); for(int m=0;m0) ans=ans*solve(div,e)%MOD; } ans=ans*fac%MOD; System.out.println(ans); } static void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }