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 ll long long

using namespace std;

//memset(dp, 0, sizeof(dp));

void work(int T) {
	
	ll n, k, res = 1, M = 1e9 + 7, nn = 0, nz = 0, np = 0;
	cin >> n >> k;
	vector<ll> a(n);
	for(int i = 0; i < n; i++) {
		cin >> a[i];
		if(a[i] > 0) {
			np++;
		} else if(a[i] < 0) {
			nn++;	
		} else {
			nz++;
		}
	}
	sort(a.begin(), a.end());
	if(k % 2 == 1 && a[n - 1] == 0) {
		cout << 0 << endl;
		return;
	}
	if(k % 2 == 1 && a[n - 1] < 0) {
		while(k) {
			res = res * a[--n] % M;
			k--;
		}
		cout << (res + M) % M << endl;
		return;
	}
	int l = 0, t = n - 1, z = lower_bound(a.begin(), a.end(), 0) - a.begin(), r = upper_bound(a.begin(), a.end(), 0) - a.begin();
	while(k) {
		if(k >= 2 && n - l >= 2 && (n - l < 2 || a[n - 1] * a[n - 2] <= (a[l] * a[l + 1]))) {
			res = res * a[l] % M;
			res = res * a[l + 1] % M;
			l += 2;
			k -= 2;
		} else {
			res = res * a[n - 1] % M;
			k--;
			n--;
		}
	}

	cout << (res + M) % M << endl;
}

int main() {
	ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.precision(10);
    cout << fixed;
	// int t;
	// for(cin >> t; t > 0; t--) {
		// work(t);
	// }
	work(0);
	return 0;
};