#include <iostream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <algorithm>
#include <set>
#include <map>
#include <bitset>
#include <cmath>
#include <functional>
#define vv(a, b, c, d) vector<vector<d> >(a, vector<d>(b, c))
#define vvi vector<vector<int> >
#define vvl vector<vector<ll> >
#define vll vector<ll>
#define rep(c, a, b) for(ll c=a;c<b;c++)
#define re(c, b) for(ll c=0;c<b;c++)
typedef long long int ll;
typedef long double ld;
using namespace std;

struct segtree {
    ll H, W;
    vector<vector<ll>> dat;
    ll inf = 1000000000000000000;
    segtree(){}
    segtree(vector<vector<ll>> &f, int mode) {
        H = W = 1;
        while(H < (int)f.size()) H <<= 1;
        while(W < (int)f[0].size()) W <<= 1;
        dat.assign(2*H-1,vector<ll>(2*W-1,0));
        if(mode==1) init_minimum(f);
        if(mode==0) init_add(f);
    }
    void init_add(vector<vector<ll>> &f) {
        for (int i = 0; i < f.size(); i++)
            for (int j = 0; j < f[0].size(); j++)
                dat[i+H-1][j+W-1] = f[i][j];
        for (int i = 2*H-2; i > H-2; i--)
            for (int j = W-2; j >= 0; j--)
                dat[i][j] = dat[i][2*j+1] + dat[i][2*j+2];
        for (int i = H-2; i >= 0; i--)
            for (int j = 0; j < 2*W-1; j++)
                dat[i][j] = dat[2*i+1][j] + dat[2*i+2][j];
    }
    ll query(int li, int lj, int ri, int rj) { return query_h(li,lj,ri,rj,0,H,0); }
    ll query_h(int li, int lj, int ri, int rj, int si, int ti, int k) {
        if(ri <= si or ti <= li) return 0;
        if(li <= si and ti <= ri) return query_w(lj,rj,0,W,k,0);
        const ll mi = (si+ti)/2;
        return query_h(li,lj,ri,rj,si,mi,2*k+1) + query_h(li,lj,ri,rj,mi,ti,2*k+2);
    }
    ll query_w(int lj, int rj, int sj, int tj, int i, int k) {
        if(rj <= sj or tj <= lj) return 0;
        if(lj <= sj and tj <= rj) return dat[i][k];
        const ll mj = (sj+tj)/2;
        return query_w(lj,rj,sj,mj,i,2*k+1) + query_w(lj,rj,mj,tj,i,2*k+2);
    }
    void init_minimum(vector<vector<ll>> &f) {
        for (int i = 0; i < f.size(); i++)
            for (int j = 0; j < f[0].size(); j++)
                dat[i+H-1][j+W-1] = f[i][j];
        for (int i = 2*H-2; i > H-2; i--)
            for (int j = W-2; j >= 0; j--)
                dat[i][j] = (dat[i][2*j+1], dat[i][2*j+2]);
        for (int i = H-2; i >= 0; i--)
            for (int j = 0; j < 2*W-1; j++)
                dat[i][j] = min(dat[2*i+1][j], dat[2*i+2][j]);
    }
    ll minimum(int li, int lj, int ri, int rj) { return minimum_h(li,lj,ri,rj,0,H,0); }
    ll minimum_h(int li, int lj, int ri, int rj, int si, int ti, int k) {
        if(ri <= si or ti <= li) return inf;
        if(li <= si and ti <= ri) return minimum_w(lj,rj,0,W,k,0);
        const ll mi = (si+ti)/2;
        return min(minimum_h(li,lj,ri,rj,si,mi,2*k+1), minimum_h(li,lj,ri,rj,mi,ti,2*k+2));
    }
    ll minimum_w(int lj, int rj, int sj, int tj, int i, int k) {
        if(rj <= sj or tj <= lj) return inf;
        if(lj <= sj and tj <= rj) return dat[i][k];
        const int mj = (sj+tj)/2;
        return min(minimum_w(lj,rj,sj,mj,i,2*k+1),minimum_w(lj,rj,mj,tj,i,2*k+2));
    }
};
int main(int argc, char const *argv[]) {
  ll n, k;std::cin >> n >> k;
  map<ll, ll> v, h, hrev, vrev;
  set<ll> y, x;
  vvl p = vv(n, 2, 0, ll);
  re(i, n) {
    std::cin >> p[i][0] >> p[i][1];
    y.insert(p[i][0]);x.insert(p[i][1]);
  }
  for(auto itr = x.begin();itr!=x.end();itr++) hrev.emplace(h.size(), *itr),h.emplace(*itr, h.size());
  for(auto itr = y.begin();itr!=y.end();itr++) vrev.emplace(v.size(),*itr),v.emplace(*itr, v.size());

  vvl d = vv(v.size(), h.size(), 0, ll);
  re(i, n) d[v.at(p[i][0])][h.at(p[i][1])]++;
  segtree seg(d, 0);
  ll ans = 8000000000000000000;
  for(int l=0;l<h.size();l++){
    for(int r=l+1;r<h.size();r++){
      for(int d=0;d<v.size();d++){
        for(int u=d+1;u<v.size();u++){
          ll t = seg.query(d, l, u+1, r+1);
          if(t<k) continue;
          ll s = (hrev.at(r)-hrev.at(l))*(vrev.at(u)-vrev.at(d));
          ans = min(ans, s);
        }
      }
    }
  }
  std::cout << ans << '\n';
  return 0;
}


Measured memory_bytes: 384