output_description: Print the minimum possible area of a rectangle that satisfies the condition.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N K  
      x_1 y_1
      :  
      x_{N} y_{N}
attempt: #include <iostream>
  #include <bits/stdc++.h>
  #define loop(N) for(int i=0;i<N;i++)
  #define vi vector<int>
  #define vs vector<string>
  #define vl vector<long long int>
  #define vpi vector<pair<int,int>>
  #define msi map<string,int>
  #define mil map<int,long long int>
  #define lli long long int
  #define plli pair<lli,lli>
  using namespace std ;
  void ps(string i){
      cout << i << endl;
  }
  
  template <class T>
  void pt(T s){
      cout << s << endl;
  }
  
  void pi(int i){
      cout << i << endl;
  }
  
  template <class T>
  void pv(vector<T> v){
      loop(v.size()){
          pt<T>(v[i]);
      }
  }
  /*********************************reused****************************/
  int n,k;
  plli p[60];
  lli state[60];
  map<string,lli> s;
  lli getSurface(){
      lli minx = -1,maxx = -1,miny = -1,maxy = -1;
      loop(k){
          if(minx == -1){
              minx = p[state[i]].first;
          }else{
              minx = min(p[state[i]].first,minx);
          }
          if(maxx == -1){
              maxx = p[state[i]].first;
          }else{
              maxx = max(p[state[i]].first,maxx);
          }
          if(miny == -1){
              miny = p[state[i]].second;
          }else{
              miny = min(p[state[i]].second,miny);
          }
          if(maxy == -1){
              maxy = p[state[i]].second;
          }else{
              maxy = max(p[state[i]].second,maxy);
          }
      }
      return (maxy-miny)*(maxx-minx);
  }
  lli dp(){
      plli p[60];
      int maxi = -1;
      lli mini = -1;
      do{
          if(mini == -1){
              mini = getSurface();
          }else{
              mini = min(mini,getSurface());
          }
          int finishi = -1;
          loop(k){
              if(state[n-i-1]!=(n-i-1)){
                  state[n-i-1]++;
                  finishi = i;
                  break;
              }
          }
          if(finishi == -1)
              break;
          loop(finishi){
              state[n-i-1] = state[n-i-2]+1;
          }
      }while(true);
  
      return mini;
  
  }
  
  bool compare(plli a,plli b){
      return a.first < b.first?true:(a.first > b.first)?false:(a.second <= b.second?true:false);
  }
  int main()
  {
      cin >> n>>k;
      loop(k){
          state[i] = i;
      }
      loop(n){
          lli x,y;
          cin >> x >> y;
          p[i] = make_pair(x,y);
      }
      sort(p,p+n,compare);
      cout <<  dp() << endl;
      return 0;
  }
  
  
problem_description: Statement
  
  We have N points in a two-dimensional plane.  
  The coordinates of the i-th point (1 \leq i \leq N) are (x_i,y_i).  
  Let us consider a rectangle whose sides are parallel to the coordinate axes
  that contains K or more of the N points in its interior.  
  Here, points on the sides of the rectangle are considered to be in the
  interior.  
  Find the minimum possible area of such a rectangle.
samples: [{"input": "4 4\n    1 4\n    3 3\n    6 2\n    8 1", "output": "21\n    \n\nOne rectangle that satisfies the condition with the minimum possible area has\nthe following vertices: (1,1), (8,1), (1,4) and (8,4).  \nIts area is (8-1) \u00d7 (4-1) = 21.\n\n* * *"}, {"input": "4 2\n    0 0\n    1 1\n    2 2\n    3 3", "output": "1\n    \n\n* * *"}, {"input": "4 3\n    -1000000000 -1000000000\n    1000000000 1000000000\n    -999999999 999999999\n    999999999 -999999999", "output": "3999999996000000001\n    \n\nWatch out for integer overflows."}]