#include #include #include #include #include #define int1 long long #define mod 1000000007 using namespace std; int1 freq[123][100005],fact[100005]; int1 power(int1 x,int1 y) { int1 res = 1; // Initialize result x = x % mod; // Update x if it is more than or // equal to p while (y > 0) { // If y is odd, multiply x with result if (y & 1) res = (res*x) % mod; // y must be even now y = y>>(int1)1; // y = y/2 x = (x*x) % mod; } return res; } int main() { string s; cin>>s; fact[1]=1; fact[0]=1; for(int1 i=2; i<=100005; i++) fact[i]=(i*fact[i-1])%mod; for(int1 i=0; i>q; while(q--) { cin>>l>>r; if(l==r) { cout<<"1"<2) den=(den*fact[f/2])%mod; } int1 nu=fact[len]; int1 prod=(nu*power(den,mod-2))%mod; if(cnt) prod=(prod*cnt)%mod; cout<