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;
typedef long long ll;
const int M = 2e5+7;
const int mod =1e9+7;
ll pz[M],pf[M];
ll z[M],f[M];
int main()
{
	ios::sync_with_stdio(false);cin.tie(0);
  	int n,k;cin>>n>>k;
  	int nm=0;//0的数量 
	int zm=0,fm=0;
  	for(int i=1;i<=n;i++)
  	{
  		int x;cin>>x;
  		if(x>0)z[++zm]=x;
  		else if(x<0)f[++fm]=-x;
  		else nm++;
	}
  	sort(z+1,z+1+zm);
  	sort(f+1,f+1+fm);
  	if(n-k<nm)
  	{
  		cout<<0<<endl;
  		return 0;
	}
	ll ans=1;
	if(zm+fm==k)
	{
		for(int i=1;i<=zm;i++)ans=ans*z[i]%mod;
		for(int i=1;i<=fm;i++)ans=ans*(-f[i])%mod;
		if(fm&1 && nm)ans=0;
		ans=(ans+mod)%mod;
		cout<<ans<<endl;
		return 0;
	}
	if(zm==0 && k&1)
	{
		for(int i=1;i<=k;i++)ans=ans*(-f[i])%mod;
		if(nm)ans=0;
		ans=(ans+mod)%mod;
		cout<<ans<<endl;
		return 0;
	}
	int q=zm,w=fm;
	int nw=0;
	while(nw<=k)
	{
		if(k-nw>=2)
		{
			if((q>=2 && z[q]*z[q-1]>f[w]*f[w-1])||w<2)
			{
				ans=ans*z[q]%mod;
				ans=ans*z[q-1]%mod;
				q-=2;
			}
			else
			{
				ans=ans*f[w]%mod;
				ans=ans*f[w-1]%mod;
				w-=2;
			}
			nw+=2;
		}
		else if(k-nw==1)
		{
			ans=ans*z[q]%mod,q--;
			nw++;
		}
		else break;
	}
	cout<< ans<<endl;
	return 0;
}