#include <bits/stdc++.h>
using namespace std;
int N, K;
int mark[100100];
long long sol = 1000000000000000000ll;
vector<pair<pair<double, double>, int> > orderX, orderY;
int main() {
  cin.tie(NULL);
  ios::sync_with_stdio(false);
  cin >> N >> K;
  for (int i = 0; i < N; i++) {
    int x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    double xC = (x1 + x2) / 2.0;
    double yC = (y1 + y2) / 2.0;
    orderX.push_back(make_pair(make_pair(xC, yC), i));
    orderY.push_back(make_pair(make_pair(yC, xC), i));
  }
  sort(orderX.begin(), orderX.end());
  sort(orderY.begin(), orderY.end());
  int step = 0;
  for (int k1 = 0; k1 <= K; k1++) {
    for (int k2 = 0; k2 <= K; k2++) {
      for (int k3 = 0; k3 <= K; k3++) {
        for (int k4 = 0; k4 <= K; k4++) {
          if (k1 + k2 + k3 + k4 > K) break;
          if (k1 + k2 + k3 + k4 >= N) break;
          step++;
          int aux, pointer;
          aux = k1;
          pointer = orderY.size() - 1;
          while (aux > 0) {
            if (mark[orderY[pointer].second] != step) {
              mark[orderY[pointer].second] = step;
              aux--;
            }
            pointer--;
          }
          aux = k2;
          pointer = 0;
          while (aux > 0) {
            if (mark[orderY[pointer].second] != step) {
              mark[orderY[pointer].second] = step;
              aux--;
            }
            pointer++;
          }
          aux = k3;
          pointer = 0;
          while (aux > 0) {
            if (mark[orderX[pointer].second] != step) {
              mark[orderX[pointer].second] = step;
              aux--;
            }
            pointer++;
          }
          aux = k4;
          pointer = orderX.size() - 1;
          while (aux > 0) {
            if (mark[orderX[pointer].second] != step) {
              mark[orderX[pointer].second] = step;
              aux--;
            }
            pointer--;
          }
          double minX, maxX, minY, maxY;
          pointer = 0;
          while (true) {
            if (mark[orderX[pointer].second] == step) {
              pointer++;
            } else {
              minX = orderX[pointer].first.first;
              break;
            }
          }
          pointer = orderX.size() - 1;
          while (true) {
            if (mark[orderX[pointer].second] == step) {
              pointer--;
            } else {
              maxX = orderX[pointer].first.first;
              break;
            }
          }
          pointer = 0;
          while (true) {
            if (mark[orderY[pointer].second] == step) {
              pointer++;
            } else {
              minY = orderY[pointer].first.first;
              break;
            }
          }
          pointer = orderY.size() - 1;
          while (true) {
            if (mark[orderY[pointer].second] == step) {
              pointer--;
            } else {
              maxY = orderY[pointer].first.first;
              break;
            }
          }
          long long width, height;
          if (minX == floor(minX) && maxX == floor(maxX)) {
            width = maxX - minX;
          } else if (minX == floor(minX)) {
            width = (maxX + 1) - (int)minX;
          } else if (maxX == floor(maxX)) {
            width = maxX - (int)minX;
          } else {
            width = maxX - minX;
          }
          if (width == 0) width = 1;
          if (minY == floor(minY) && maxY == floor(maxY)) {
            height = maxY - minY;
          } else if (minY == floor(minY)) {
            height = (maxY + 1) - (int)minY;
          } else if (maxY == floor(maxY)) {
            height = maxY - (int)minY;
          } else {
            height = maxY - minY;
          }
          if (height == 0) height = 1;
          sol = min(sol, (long long)width * height);
        }
      }
    }
  }
  cout << sol << endl;
  return 0;
}
