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;
   #define int long long
const int MAX = 510000;
const int MOD = 1000000007;
priority_queue<int,vector<int>,greater<int>> que;
     signed main(){
int n,k;
cin>>n>>k;
int a[n];
for(int i=0;i<n;i++)cin>>a[i];

sort(a,a+n);

for(int i=n-1;i>=0;i--)if(que.size()<k&&a[i]>0)que.push(a[i]);
if((que.size()==0&&k%2==1)||n==k){
int ans2=1;
for(int i=0;i<k;i++){ans2=(ans2*(MOD+a[n-1-i])%MOD)%MOD;}
cout<<ans2<<endl;
return 0;
}
if(que.size()<k&&(k-que.size())%2==1)que.pop();
int x=0;
for(int i=0;i*2+1<n;i++){
   // cerr<<x<<' ';
   if(que.size()+x==k&&que.size()<=1)break;
    if(a[i*2]<=0&&a[i*2+1]<=0){
        if(que.size()+x<k){
            x+=2;
            
            continue;
        }
        int p=que.top();
        que.pop();
        if(p*que.top()<a[i*2]*a[i*2+1]){
            que.pop();
            x+=2;
            continue;
        }else{
            que.push(p);
            break;
        }
    }
}
int ans=1;
for(int i=0;i<x;i++)ans=(ans*(-1*a[i]))%MOD;
while(!que.empty()){
  //  cerr<<que.top()<<endl;
    ans=(ans*que.top())%MOD;
    que.pop();
}
cout<<ans<<endl;

     }


 


 






    





      

        
