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;
const int mod=1e9+7;
long long a[200005];
long long ans=1;
int main()
{
	int n,k;cin>>n>>k;
	for(int i=1;i<=n;i++)
	{
		cin>>a[i];
	}
	sort(a+1,a+1+n);
	if(k%2==0)
	{
		int p1=1,p2=n;
		while(p2>p1&&k)
		{
			if(a[p2]*a[p2-1]>=a[p1]*a[p1+1])
			{
				ans=ans*a[p2]%mod*a[p2-1]%mod;
				p2-=2;
				k-=2;
			}
			else
			{
				ans=ans*a[p1]%mod*a[p1+1]%mod;
				p1+=2;
				k-=2;
			}
		}
	}
	else if(k%2==1)//ÆæÊý¸ö
	{
		if(a[n]<0)
		{
			//×î´óÖ»ÄÜÎª¸ºÊý
		//	ans=a[n];
			for(int i=n;i>=n+1-k;i--)
			{
				ans=ans*a[i]%mod;
			}
		}
		else if(a[n]>=0)
		{
			//¿ÉÒÔÎªÕýÊý
			ans=a[n];
			k--;
			int p1=1,p2=n-1;
			while(p2>p1&&k)
			{
				if(a[p2]*a[p2-1]>=a[p1]*a[p1+1])
				{
					ans=ans*a[p2]%mod*a[p2-1]%mod;
					p2-=2;
					k-=2;
				}
				else
				{
					ans=ans*a[p1]%mod*a[p1+1]%mod;
					p1+=2;
					k-=2;
				}
			}
		}
	}
	cout<<(ans+mod)%mod;
}