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
#import<bits/stdc++.h>
#define endl '\n'
using namespace std;
typedef long long LL;
LL i,j,k,l,m,n,p=1,q=1e9+7,v,w,x,y,z,a[200040],b[200040];
int C(LL a,LL b){return labs(a)>labs(b);}
LL P(LL x,LL y)
{
	LL i=q-2,v=x;
	for(;i;i>>=1)
	{
		if(i&1)
		{
			v=v*y%q;
		}
		y=y*y%q;
	}
	return v;
}
int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	cin>>n>>k;
	for(;i<n;i++)
	{
		cin>>a[i];
		if(a[i]>0)x++;
	}
	if(k<2)
	{
		sort(a,a+n);
		cout<<(a[n-1]+q)%q;
	}
	else if(k==n)
	{
		for(i=0;i<k;i++)p=p*(a[i]+q)%q;
		cout<<p;
	}
	else if(!x)
	{
		sort(a,a+n);
		if(k%2)
		{
			for(i=0;i++<k;)p=p*(a[n-i]+q)%q;
		}
		else
		{
			for(i=0;i<k;i++)p=p*(a[i]+q)%q;
		}
		cout<<p;
	}
	else
	{
		sort(a,a+n,C);
		for(i=x=0;i<k;i++)
		{
			if(a[i]>0)
			{
				x++;
				p=p*a[i]%q;
			}
			else if(a[i]<0)
			{
				y++;
				p=p*(a[i]+q)%q;
			}
			else
			{
				cout<<0;
				return 0;
			}
		}
		if(y%2)
		{
			for(v=k-1;a[v]>0;)v--;
			for(w=k;a[w]<0;)w++;
			for(x=k-1;~x&&a[x]<0;)x--;
			for(y=k;a[y]>0;)y++;
			if(a[w]*a[x]>a[y]*a[v]||x<0)
			{
				cout<<P(p*a[w]%q,a[v]+q);
			}
			else
			{
				cout<<P(p*(a[y]+q)%q,a[x]);
			}
		}
		else cout<<p;
	}
}