#include #include #include #define N 10000000 #define MOD 1000000007 #define LL long long using namespace std; bool flag[N+5]={0}; int prime[1000000],cnt=0; void Prime(){ for(int i=2;i>=1; } return ans; } LL fac[N+5]; int a; int main(){ int n; fac[1]=1; for(int i=2;i<=N;i++) fac[i]=(fac[i-1]*i)%MOD; Prime(); while(scanf("%d",&n)!=EOF&&n){ LL ret=1; for(int i=0;i