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>
using namespace std;
#define mod ((int)1e9+7)
#define maxn 200010
typedef long long ll;
int n,K;
ll num[maxn];
bool cmp(ll a,ll b){return abs(a)>abs(b);}
void get_ans(){
	ll ans=1;
	for(int i=1;i<=K;i++){
		ans=ans*num[i]%mod;
	}
	cout<<(ans+mod)%mod<<endl;
}
int main(){
	//freopen("data.in","r",stdin);
	scanf("%d %d",&n,&K);
	for(int i=1;i<=n;i++) scanf("%lld",&num[i]);
	sort(num+1,num+n+1,cmp);
	int a=0,b=0,lsta=-1,lstb=-1;
	for(int i=1;i<=K;i++){
		if(num[i]>0) a++,lsta=i;
		if(num[i]<0) b++,lstb=i;
	}
	if(b%2==0){
		get_ans(); return 0;
	}
	else{
		int fira=-1,firb=-1;
		if(a){
			for(int i=K+1;i<=n;i++)if(num[i]<0){
				firb=i; break;
			}
		}
		if(b){
			for(int i=K+1;i<=n;i++)if(num[i]>0){
				fira=i; break;
			}
		}
		if(fira==-1&&firb==-1){
			ll ans=1;
			for(int i=n;i>=n-K+1;i--) ans=ans*num[i]%mod;
			cout<<(ans+mod)%mod;
			return 0;
		}
		else{
			if(a&&firb!=-1&&b&&fira!=-1){
				if(num[lsta]*num[fira]>num[lstb]*num[firb])
					swap(num[lstb],num[fira]);
				else swap(num[lsta],num[firb]);
			}
			else if(a&&firb!=-1){
				swap(num[lsta],num[firb]);
			}
			else if(b&&fira!=-1){
				swap(num[lstb],num[fira]);
			}
			get_ans();return 0;
		}
	}
}