#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <cmath>
#include <queue>
#include <set>
#include <map>
#include <stack>
#include <unordered_map>
using namespace std;
constexpr int N=5e4+7;
#define int long long
int a[N],b[N];
int n,k;
int check(int x){
int res=0;
for(int i=1;i<=n;i++){
int l=0,r=n;
while(l<r){
int mid=(l+r+1)>>1;
if(a[i]*b[mid]<=x) l=mid;
else r=mid-1;
}
res+=n-l;
}
return res<k;
}
signed main(){
cin>>n>>k;
for(int i=1;i<=n;i++){
cin>>a[i]>>b[i];
}
sort(a+1,a+n+1);
sort(b+1,b+n+1);
int l=a[1]*b[1],r=a[n]*b[n];
int mid;
while(l<r){
mid=l+r>>1;
if(check(mid)) r=mid;
else l=mid+1;
}
cout<<l<<endl;
}