import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.NoSuchElementException; public class Main { public static void main(String[] args) throws IOException { new Main().run(); } long pow(long a, long n) { if (n==0) return 1; return pow(a*a%mod, n/2) * (n%2==1?a:1) % mod; } long inv(long a) { return pow(a, mod-2); } final long mod=(long)1e9+7; long[][] mul(long[][] a, long[][] b) { long[][] c=new long[a.length][b[0].length]; for (int i=0;i Integer.MAX_VALUE) throw new NumberFormatException(); return (int) nl; } public double nextDouble() { return Double.parseDouble(next()); } }