A girl named Sonya is studying in the scientific lyceum of the Kingdom of Kremland. The teacher of computer science (Sonya's favorite subject!) invented a task for her.

Given an array a of length n, consisting only of the numbers 0 and 1, and the number k. Exactly k times the following happens: 

  * Two numbers i and j are chosen equiprobable such that (1 ≤ i < j ≤ n). 
  * The numbers in the i and j positions are swapped. 



Sonya's task is to find the probability that after all the operations are completed, the a array will be sorted in non-decreasing order. She turned to you for help. Help Sonya solve this problem.

It can be shown that the desired probability is either 0 or it can be represented as P/Q, where P and Q are coprime integers and Q not≡ 0~\pmod {10^9+7}.

Input

The first line contains two integers n and k (2 ≤ n ≤ 100, 1 ≤ k ≤ 10^9) — the length of the array a and the number of operations.

The second line contains n integers a_1, a_2, …, a_n (0 ≤ a_i ≤ 1) — the description of the array a.

Output

If the desired probability is 0, print 0, otherwise print the value P ⋅ Q^{-1} \pmod {10^9+7}, where P and Q are defined above.

Examples

Input


3 2
0 1 0


Output


333333336

Input


5 1
1 1 1 0 0


Output


0

Input


6 4
1 0 0 1 1 0


Output


968493834

Note

In the first example, all possible variants of the final array a, after applying exactly two operations: (0, 1, 0), (0, 0, 1), (1, 0, 0), (1, 0, 0), (0, 1, 0), (0, 0, 1), (0, 0, 1), (1, 0, 0), (0, 1, 0). Therefore, the answer is 3/9=1/3.

In the second example, the array will not be sorted in non-decreasing order after one operation, therefore the answer is 0.
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.math.BigInteger;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.PriorityQueue;
import java.util.Random;
import java.util.TreeSet;

public final class CF_553_D2_F
{


	static boolean verb=true;
	static void log(Object X){if (verb) System.err.println(X);}
	static void log(Object[] X){if (verb) {for (Object U:X) System.err.print(U+" ");System.err.println("");}}
	static void log(int[] X){if (verb) {for (int U:X) System.err.print(U+" ");System.err.println("");}}
	static void log(int[] X,int L){if (verb) {for (int i=0;i<L;i++) System.err.print(X[i]+" ");System.err.println("");}}
	static void log(long[] X){if (verb) {for (long U:X) System.err.print(U+" ");System.err.println("");}}

	static void logWln(Object X){if (verb) System.err.print(X);}
	static void info(Object o){	System.out.println(o);}
	static void output(Object o){outputWln(""+o+"\n");	}
	static void outputWln(Object o){try {out.write(""+ o);} catch (Exception e) {}}

	static long powerMod(long b,long e,long m){
		long x=1;
		while (e>0) {
			if (e%2==1)
				x=(b*x)%m;
			b=(b*b)%m;
			e=e/2;
		}
		return x; 
	}

	static long inv(long x,long mod){
		return powerMod(x,mod-2,mod);
	}

	static long[][] mult(long[][] A,long[][] B,long mod){
		int M=A.length;
		long[][] res=new long[M][M];
		for (int i=0;i<M;i++)
			for (int j=0;j<M;j++) {
				res[i][j]=0;
				for (int k=0;k<M;k++) {
					res[i][j]+=A[i][k]*B[k][j];
					if (res[i][j]>=mod)
						res[i][j]%=mod;
				}

			}
		return res;
	}

	static long[][] powerMat(long[][] A,long e,long mod){
		long[][] X=null;
		long[][] B=A;
		while (e>0) {
			if (e%2==1) {
				if (X==null) 
					X=B;
				else 
					X=mult(B,X,mod);
			}
			B=mult(B,B,mod);
			e=e/2;
		}
		return X;	
	}

	static long mult(long a,long b,long mod){
		long c=a*b;
		if (c>=mod)
			c%=mod;
		return c;
	}

	static long mod=1000000007;

	// Global vars
	static BufferedWriter out;
	static InputReader reader;
	static int[] anc,rank,max,list;





	static void process() throws Exception {

		out = new BufferedWriter(new OutputStreamWriter(System.out));
		reader = new InputReader(System.in);

		int n=reader.readInt();
		int[] a=new int[n];
		long k=reader.readInt();

		log(inv(2,mod));
		int zer=0;
		int one=0;
		for (int i=0;i<n;i++){
			a[i]=reader.readInt();
			if (a[i]==0)
				zer++;
			else
				one++;
		}

		int MX=zer+1;
		long[][] mat=new long[MX][MX];
		// lets prob[x] = probability that we got x "zeroes" in the first zer position
		// how to move from prob[x] to prob[y]
		// too interesting case: a zero below zer pos is changed with a one beyond
		// or same with one and zero
		
		long nn=(n*(n-1))/2;
		long invnn=inv(nn,mod);
		
		for (int x=0;x<MX;x++){
			long A=0;
			long B=0;
			if (x>0){
				// take a zero below zer

				long prob1=x;
				//log("prob1:"+prob1);
				// take a one beyond zer


				// how many ones beyond zer
				long prob2=one-(zer-x);
				if (prob2>=0){
				//log("prob2:"+prob2);
				A=mult(prob1,prob2,mod);
				A=mult(A,invnn,mod);
				mat[x][x-1]=A;
				}
			}
			if (x<zer){
				// take a one below zer

				long prob1=zer-x;
				// take a zero beyond zer

				long prob2=zer-x;
				if (prob2>=0){
				B=mult(prob1,prob2,mod);
				B=mult(B,invnn,mod);
				mat[x][x+1]=B;
				}
			}
			long C=(mod-A);
			if (C>=mod)
				C-=mod;
			C+=(mod-B);
			if (C>=mod)
				C-=mod;
			C++;
			if (C>=mod)
				C-=mod;
			mat[x][x]=C;
		}
		/*
		log("----------");
		for (int i=0;i<MX;i++){
			log(mat[i]);
		}
		*/
		long[][] matk=powerMat(mat,k,mod);
		int bob=0;
		for (int i=0;i<zer;i++){
			if (a[i]==0)
				bob++;
		}
		//log("bob:"+bob);
		output(matk[bob][zer]);

		/*
		for (int i=0;i<MX;i++){
			log(matk[i]);
		}
		*/
		
		try {
			out.close();
		} catch (Exception e) {
		}

	}

	public static void main(String[] args) throws Exception {
		process();

	}

	static final class InputReader {
		private final InputStream stream;
		private final byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		private int read() throws IOException {
			if (curChar >= numChars) {
				curChar = 0;
				numChars = stream.read(buf);
				if (numChars <= 0) {
					return -1;
				}
			}
			return buf[curChar++];
		}

		public final String readString() throws IOException {
			int c = read();
			while (isSpaceChar(c)) {
				c = read();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.append((char) c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public final int readInt() throws IOException {
			int c = read();
			boolean neg = false;
			while (isSpaceChar(c)) {
				c = read();
			}
			char d = (char) c;
			// log("d:"+d);
			if (d == '-') {
				neg = true;
				c = read();
			}
			int res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			// log("res:"+res);
			if (neg)
				return -res;
			return res;

		}

		public final long readLong() throws IOException {
			int c = read();
			boolean neg = false;
			while (isSpaceChar(c)) {
				c = read();
			}
			char d = (char) c;
			// log("d:"+d);
			if (d == '-') {
				neg = true;
				c = read();
			}
			long res = 0;
			do {
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			// log("res:"+res);
			if (neg)
				return -res;
			return res;

		}

		private boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
	}

}