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<stdio.h>
#include<cstdio>
#include<iostream>
#include<algorithm>
#include<queue>
#include<cstring>
using namespace std;
const int maxn=200100;
typedef long long LL;
int n,m;LL a[maxn],b[maxn],t1,t2,tot,c[maxn];
LL ans,mod=1e9+7;
int main()
{
	scanf("%d%d",&n,&m);
	for(int i=1;i<=n;++i)
	{
		scanf("%lld",&c[i]);
		if(c[i]>=0)
		{
			a[++t1]=c[i];
		}
		else
		{	
			b[++t2]=c[i];
		}
	}
	ans=1;
	sort(a+1,a+1+t1);
	sort(b+1,b+1+t2);
	if(t1==0&&m%2==1)
	{
		for(int i=t2;i>t2-m;--i)
		{
			ans=(ans%mod*b[i]%mod+mod)%mod;
		}
	}
	else
	{
		sort(c+1,c+1+n);
		int x=n,y=1;	
		LL k1,k2;
		while(m>0)
		{
			if(m%2==1)
			{
				ans=ans*c[x]%mod;
				x--;m--;
			}
			else if(m>=2)
			{
				k1=c[x]*c[x-1];
			//	cout<<a[x]<<" "<<a[x-1]<<" "<<a[x]*a[x-1]<<endl;
				k2=c[y]*c[y+1];
			//	cout<<k1<<" "<<k2<<endl;
				if(k1<k2)
				{
					ans=k2%mod*ans%mod;
					y+=2;
					m-=2;
				}
				else
				{
					ans=k1%mod*ans%mod;
					x-=2;
					m-=2;
					
				}
			//	cout<<ans<<endl;
			}
			
		}
		
	}
		
	printf("%lld\n",(ans%mod+mod)%mod);
	return 0;
}
