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>
#define MOD 1000000007
using namespace std;
long long solve(vector<long long> neg, vector<long long> pos, int k)
{
	long long ans = 1;
	if(k&1)
	{
		if(pos.size()>0)
			ans *= pos.back(),pos.pop_back(),--k;
		else return -1;
	}
	vector<long long> v;
	for(int i=pos.size()-1;i>=1;i-=2)	
		v.push_back(pos[i]*pos[i-1]);
	for(int i=0;i+1<neg.size();i+=2)	
		v.push_back(neg[i]*neg[i+1]);
	if(v.size()<k/2)
		return -1;
	sort(v.rbegin(),v.rend());
	for(int i=0;i<k/2;++i)
		ans *= v[i]%MOD, ans %= MOD;
	return ans;
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int n,k;
	cin>>n>>k;
	long long x;
	vector<long long> neg,pos,zero;
	while(n--)
	{
		cin>>x;
		if(x<0)
			neg.push_back(abs(x));
		else if(x>0)
			pos.push_back(x);
		else
			zero.push_back(x);
	}
	sort(pos.begin(),pos.end());
	sort(neg.rbegin(),neg.rend());
	long long ans = solve(neg,pos,k);
	if(ans<0)
	{
		if(zero.size()>0)
			cout<<"0"<<endl;
		else
		{
			for(long long y:neg)
				pos.push_back(y);	
			sort(pos.begin(),pos.end());
			ans = 1;
			while(k--)			
				ans *= pos[k], ans %= MOD;
			cout<<MOD-ans<<endl;
		}
	}
	else cout<<ans<<endl;
	return 0;
}