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>
#pragma GCC optimize("O2")
#pragma GCC optimize("O3")
#pragma GCC target("avx")
#define rep(i,N) for(int i=0;i<(int)N;i++)
#define swap(a,b) (a+=b,b=a-b,a-=b)
const int MOD=1e9+7;
static inline int IN(void)
{
  int x=0,f=0,c=getchar();while(c<48||c>57){f^=c==45,c=getchar();}
  while(c>47&&c<58){x=x*10+c-48,c=getchar();}return f?-x:x;
}
static inline void Radix32(int *a,const int sz)
{
  int x,shift=0,elem[256],temp[sz];
  while(shift<32)
  {
    int bucket[256]={0};
    rep(i,sz){x=(a[i]>>shift)&255;bucket[x]++;temp[i]=a[i];}
    elem[0]=0;rep(i,255)elem[i+1]=elem[i]+bucket[i];
    rep(i,sz){x=(temp[i]>>shift)&255;a[elem[x]]=temp[i];elem[x]++;}
    shift+=8;
  }
}
int main()
{
  int N=IN(),K=IN(),l,m=0,r,accum=1,sign=1,A[N];long x,y;
  rep(i,N)A[i]=IN(),m+=A[i]<0?1:0;
  Radix32(A,N);
  rep(i,m/2)swap(A[N-m+i],A[N-1-i]);
  rep(i,(N-m)/2)swap(A[i],A[N-m-1-i]);
  rep(i,N/2)swap(A[i],A[N-1-i]);
  if(K&1)accum=A[N-1],sign=(A[N-1]<0?-1:1),N--,K--;
  l=0,r=N-1;
  while(K)
  {
    x=1l*A[l]*A[l+1],y=1l*A[r]*A[r-1];
    if(x*sign>y*sign)x%=MOD,accum=1l*accum*x%MOD,l+=2;
    else y%=MOD,accum=1l*accum*y%MOD,r-=2;
    K-=2;
  }
  return printf("%ld\n",(1l*accum%MOD+MOD)%MOD),0;
}