Given are N integers A_1,\ldots,A_N.

We will choose exactly K of these elements. Find the maximum possible product of the chosen elements.

Then, print the maximum product modulo (10^9+7), using an integer between 0 and 10^9+6 (inclusive).

Constraints

* 1 \leq K \leq N \leq 2\times 10^5
* |A_i| \leq 10^9

Input

Input is given from Standard Input in the following format:


N K
A_1 \ldots A_N


Output

Print the maximum product modulo (10^9+7), using an integer between 0 and 10^9+6 (inclusive).

Examples

Input

4 2
1 2 -3 -4


Output

12


Input

4 3
-1 -2 -3 -4


Output

1000000001


Input

2 1
-1 1000000000


Output

1000000000


Input

10 10
1000000000 100000000 10000000 1000000 100000 10000 1000 100 10 1


Output

999983200
#include<bits/stdc++.h>
#define M 1000000007
using namespace std;
int n, k, gz, gf, m, l;
long long ans=1, a[200005], b[200005];
int main(){
	scanf("%d%d", &n, &m);
	for(int i=1; i<=n; i++){
		scanf("%d", &k);
		if(k>0) a[++gz]=k;
		else if(k<0) b[++gf]=0-k;
		else l++;
	}
	sort(a+1, a+gz+1);
	sort(b+1, b+gf+1);
	if(m%2){
		if(gz) ans=a[gz--];
		else if(l){
			printf("0");
			return 0;
		}
		else{
			for(int i=1; i<=m; i++){
				ans=ans*b[i]%M;
			}
			printf("%lld", M-ans);
			return 0;
		}
	}
	m/=2;
	while(m){
		if(gz<2){
			ans=ans*b[gf]%M*b[gf-1]%M;
			gf-=2;
		}
		else if(gf<2){
			ans=ans*a[gz]%M*a[gz-1]%M;
			gz-=2;
		}
		else if(a[gz]*a[gz-1]<b[gf]*b[gf-1]){
			ans=ans*b[gf]%M*b[gf-1]%M;
			gf-=2;
		}
		else{
			ans=ans*a[gz]%M*a[gz-1]%M;
			gz-=2;
		}
		m--;
		if(gz<2 && gf<2) break;
	}
	if(m){
		if(l) printf("0");
		else printf("%lld", M-ans*a[1]%M*b[1]%M);
	}
	else printf("%lld", ans);
	return 0;
}