from sys import stdin input=lambda :stdin.readline()[:-1] mod=10**9+7 table_size=10**5*4-1 fac=[1]*(table_size+1) finv=[1]*(table_size+1) for i in range(2,table_size+1): fac[i]=fac[i-1]*i%mod finv[table_size]=pow(fac[table_size],mod-2,mod) for i in range(table_size-1,-1,-1): finv[i]=finv[i+1]*(i+1)%mod def binom(n,k): if n<0 or k<0: return 0 if k>n: return 0 return (fac[n]*finv[k]%mod)*finv[n-k]%mod def inv(a): if a