import java.io.IOException; import java.io.InputStream; import java.util.Arrays; import java.util.NoSuchElementException; public class Main{ public static void main(String[] args) { new Main().solve(); } final long MOD=(long)1e9+7; int MAX=(int)3e5; long[] fac=new long[MAX]; long[] ifac=new long[MAX]; { fac[0]=1; for (int i=1;i