// Slower C++ solution:
#pragma GCC optimize ("Ofast")

#include<bits/stdc++.h>

using namespace std;

void *wmem;

char memarr[96000000];

template<class T> inline void walloc1d(T **arr, int x, void **mem = &wmem){

  static int skip[16] = {0, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1};

  (*mem) = (void*)( ((char*)(*mem)) + skip[((unsigned long long)(*mem)) & 15] );

  (*arr)=(T*)(*mem);

  (*mem)=((*arr)+x);

}

void sortF_L(int N, unsigned A[], void *mem = wmem){

  int i;

  int m;

  int bt;

  unsigned *arr;

  unsigned c;

  int *sz;

  if(N < 256){

    sort(A, A+N);

    return;

  }

  bt = sizeof(unsigned) * 8;

  walloc1d(&arr, N, &mem);

  walloc1d(&sz, N, &mem);

  for(m=0;m<bt;m+=8){

    for(i=(0);i<(257);i++){

      sz[i] = 0;

    }

    for(i=(0);i<(N);i++){

      sz[ 1+((A[i]>>m)&255u) ]++;

    }

    for(i=(1);i<(257);i++){

      sz[i] += sz[i-1];

    }

    for(i=(0);i<(N);i++){

      c = ((A[i]>>m)&255u);

      arr[sz[c]++] = A[i];

    }

    swap(A, arr);

  }

}

void sortF_L(int N, int A[], void *mem = wmem){

  int i;

  int x;

  int y;

  int z;

  int *arr;

  unsigned *send;

  if(N < 256){

    sort(A, A+N);

    return;

  }

  send = (unsigned*)A;

  sortF_L(N, send, mem);

  if(A[0] < 0 || A[N-1] >= 0){

    return;

  }

  x = 0;

  y = N;

  while(x < y){

    z = (x+y) / 2;

    if(A[z] < 0){

      y = z;

    }

    else{

      x = z+1;

    }

  }

  walloc1d(&arr, N, &mem);

  z = 0;

  for(i=(x);i<(N);i++){

    arr[z++] = A[i];

  }

  for(i=(0);i<(x);i++){

    arr[z++] = A[i];

  }

  for(i=(0);i<(N);i++){

    A[i] = arr[i];

  }

}

void sortF_L(int N, unsigned long long A[], void *mem = wmem){

  int i;

  int m;

  int bt;

  unsigned long long *arr;

  unsigned c;

  int *sz;

  if(N < 512){

    sort(A, A+N);

    return;

  }

  bt = sizeof(unsigned long long) * 8;

  walloc1d(&arr, N, &mem);

  walloc1d(&sz, N, &mem);

  for(m=0;m<bt;m+=8){

    for(i=(0);i<(257);i++){

      sz[i] = 0;

    }

    for(i=(0);i<(N);i++){

      sz[ 1+((A[i]>>m)&255u) ]++;

    }

    for(i=(1);i<(257);i++){

      sz[i] += sz[i-1];

    }

    for(i=(0);i<(N);i++){

      c = ((A[i]>>m)&255u);

      arr[sz[c]++] = A[i];

    }

    swap(A, arr);

  }

}

void sortF_L(int N, long long A[], void *mem = wmem){

  int i;

  int x;

  int y;

  int z;

  long long *arr;

  unsigned long long *send;

  if(N < 512){

    sort(A, A+N);

    return;

  }

  send = (unsigned long long*)A;

  sortF_L(N, send, mem);

  if(A[0] < 0 || A[N-1] >= 0){

    return;

  }

  x = 0;

  y = N;

  while(x < y){

    z = (x+y) / 2;

    if(A[z] < 0){

      y = z;

    }

    else{

      x = z+1;

    }

  }

  walloc1d(&arr, N, &mem);

  z = 0;

  for(i=(x);i<(N);i++){

    arr[z++] = A[i];

  }

  for(i=(0);i<(x);i++){

    arr[z++] = A[i];

  }

  for(i=(0);i<(N);i++){

    A[i] = arr[i];

  }

}

inline void rd(int &x){

  int k;

  int m=0;

  x=0;

  for(;;){

    k = getchar_unlocked();

    if(k=='-'){

      m=1;

      break;

    }

    if('0'<=k&&k<='9'){

      x=k-'0';

      break;

    }

  }

  for(;;){

    k = getchar_unlocked();

    if(k<'0'||k>'9'){

      break;

    }

    x=x*10+k-'0';

  }

  if(m){

    x=-x;

  }

}

inline void rd(long long &x){

  int k;

  int m=0;

  x=0;

  for(;;){

    k = getchar_unlocked();

    if(k=='-'){

      m=1;

      break;

    }

    if('0'<=k&&k<='9'){

      x=k-'0';

      break;

    }

  }

  for(;;){

    k = getchar_unlocked();

    if(k<'0'||k>'9'){

      break;

    }

    x=x*10+k-'0';

  }

  if(m){

    x=-x;

  }

}

inline void wt_L(char a){

  putchar_unlocked(a);

}

inline void wt_L(long long x){

  int s=0;

  int m=0;

  char f[20];

  if(x<0){

    m=1;

    x=-x;

  }

  while(x){

    f[s++]=x%10;

    x/=10;

  }

  if(!s){

    f[s++]=0;

  }

  if(m){

    putchar_unlocked('-');

  }

  while(s--){

    putchar_unlocked(f[s]+'0');

  }

}

template<class T> long long counterProdIsLT(int As, T A[], int Bs, T B[], T val){

  int i;

  int j;

  int ma = 0;

  int za = 0;

  int pa = 0;

  int mb = 0;

  int zb = 0;

  int pb = 0;

  long long res = 0;

  i = 0;

  while(i < As && A[i] < 0){

    i++;

  }

  ma = i;

  while(i < As && A[i] == 0){

    i++;

  }

  za = i - ma;

  pa = As - i;

  i = 0;

  while(i < Bs && B[i] < 0){

    i++;

  }

  mb = i;

  while(i < Bs && B[i] == 0){

    i++;

  }

  zb = i - mb;

  pb = Bs - i;

  if(val < 0){

    j = 0;

    for(i=(0);i<(pa);i++){

      while(j < mb && A[As-pa+i] * B[j] < val){

        j++;

      }

      res += j;

    }

    j = 0;

    for(i=(0);i<(pb);i++){

      while(j < ma && B[Bs-pb+i] * A[j] < val){

        j++;

      }

      res += j;

    }

  }

  else if(val == 0){

    res = (long long) ma * pb + (long long) pa * mb;

  }

  else{

    res = (long long) As * Bs - (long long) pa * pb - (long long) ma * mb;

    j = pb;

    for(i=(0);i<(pa);i++){

      while(j && A[As-pa+i] * B[Bs-pb+j-1] >= val){

        j--;

      }

      if(j==0){

        break;

      }

      res += j;

    }

    j = mb;

    for(i=(0);i<(ma);i++){

      while(j && A[ma-1-i] * B[mb-j] >= val){

        j--;

      }

      if(j==0){

        break;

      }

      res += j;

    }

  }

  return res;

}

int N;

long long A[200000];

long long K;

int main(){

  wmem = memarr;

  long long res;

  long long cnt;

  rd(N);

  rd(K);

  {

    int Lj4PdHRW;

    for(Lj4PdHRW=(0);Lj4PdHRW<(N);Lj4PdHRW++){

      rd(A[Lj4PdHRW]);

    }

  }

  sortF_L(N, A);

  long long e98WHCEY;

  long long cTE1_r3A;

  long long RZTsC2BF;

  e98WHCEY = -1000000000000000000LL;

  cTE1_r3A = 1000000000000000000LL;

  while(e98WHCEY < cTE1_r3A){

    int i;

    if((e98WHCEY + cTE1_r3A)%2==0){

      RZTsC2BF = (e98WHCEY + cTE1_r3A) / 2;

    }

    else{

      RZTsC2BF = (e98WHCEY + cTE1_r3A - 1) / 2;

    }

    cnt = counterProdIsLT(N,A,N,A,RZTsC2BF+1);

    for(i=(0);i<(N);i++){

      if(A[i]*A[i] <= RZTsC2BF){

        cnt--;

      }

    }

    cnt /= 2;

    if(cnt >= K){

      cTE1_r3A = RZTsC2BF;

    }

    else{

      e98WHCEY = RZTsC2BF + 1;

    }

  }

  res =cTE1_r3A;

  wt_L(res);

  wt_L('\n');

  return 0;

}

// cLay varsion 20200217-1



// --- original code ---

// int N; ll A[2d5], K;

// 

// {

//   ll res, cnt;

//   rd(N,K,A(N));

//   sortF(N, A);

// 

//   res = bsearch_min[ll,x,-1d18,1d18][

//     cnt = counterProdIsLT(N,A,N,A,x+1);

//     rep(i,N) if(A[i]*A[i] <= x) cnt--;

//     cnt /= 2;

//   ](cnt >= K);

// 

//   wt(res);

// }


// Faster C++ solution for the same problem (measured speedup: 4.938312909208497x):
#include <stdio.h>

#include <algorithm>

long long p = 1000000000;

long long l, r, m, t, k;

long long n, x, y, z, w;

long long a[200000];

int main() {

	l = p * p * (-1);

	r = p * p + 1;

	scanf("%lld%lld", &n, &k);

	for (int i = 0; i < n; i++) {

		scanf("%lld", a + i);

		if (a[i] < 0)x++;

		if (a[i] == 0)y++;

		if (a[i] > 0)z++;

	}

	std::sort(a, a + n);

	while (r - l > 1) {

		m = (r + l) / 2;

		t = 0;

		if (m == 0) {

			t = x * z;

		}

		if (m > 0) {

			t = x * z + (x + z) * y + y * (y - 1) / 2;

			w = n - 1;

			for (long long i = x + y; i < n; i++) {

				while (a[w] * a[i] >= m)w--;

				if (w > i)t += w - i;

				else break;

			}

			w = 0;

			for (long long i = x - 1; i >= 0; i--) {

				while (a[w] * a[i] >= m)w++;

				if (w < i)t += i - w;

				else break;

			}

		}

		if (m < 0) {

			w = x - 1;

			for (long long i = n - 1; i >= x + y; i--) {

				while (w >= 0 && a[w] * a[i] >= m)w--;

				if (w >= 0)t += w + 1;

			}

		}

		if (t < k)l = m;

		else r = m;

	}

	printf("%lld\n", l);

}