#include <bits/stdc++.h> #include <unistd.h> using namespace std; typedef long long LL; const int N=1.1e6+10,P=1e9+7; LL n,fac[N],ifac[N]; LL ksm(LL a,LL b) { LL res=1; for(;b;b>>=1,a=a*a%P) if(b&1) res=res*a%P; return res; } void init(int n) { fac[0]=1; for(int i=1;i<=n;i++...