#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const double eps = 0.01;
struct rect {
  int x1, y1, x2, y2;
  double xc, yc;
  rect() {}
  void read() {
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    xc = (x1 + x2) / 2.0;
    yc = (y1 + y2) / 2.0;
  }
  void write() { cout << fixed << xc << " " << yc << "\n"; }
};
long long diff(double A, double B) {
  return max((long long)(abs(A - B) + eps), (long long)(1));
}
void solution() {
  int n, k;
  scanf("%d%d", &n, &k);
  vector<pair<double, double> > data(n);
  int x1, y1, x2, y2;
  double xc, yc;
  for (int i = 0; i < n; i++) {
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    xc = (x1 + x2) / 2.0;
    yc = (y1 + y2) / 2.0;
    data[i] = make_pair(xc, yc);
  }
  long long X = (long long)(INF) * (INF);
  for (int left = 0; left <= k; left++) {
    for (int right = 0; right <= k - left; right++) {
      for (int up = 0; up <= k - left - right; up++) {
        int down = k - left - right - up;
        vector<bool> blocked(n, false);
        for (int i = 0; i < left; i++) {
          double leftmost = INF;
          int k = 0;
          for (int j = 0; j < n; j++) {
            if (blocked[j]) {
              continue;
            }
            if (data[j].first < leftmost) {
              leftmost = data[j].first;
              k = j;
            }
          }
          blocked[k] = true;
        }
        for (int i = 0; i < right; i++) {
          double rightmost = -INF;
          int k = 0;
          for (int j = 0; j < n; j++) {
            if (blocked[j]) {
              continue;
            }
            if (data[j].first > rightmost) {
              rightmost = data[j].first;
              k = j;
            }
          }
          blocked[k] = true;
        }
        for (int i = 0; i < up; i++) {
          double upmost = -INF;
          int k = 0;
          for (int j = 0; j < n; j++) {
            if (blocked[j]) {
              continue;
            }
            if (data[j].second > upmost) {
              upmost = data[j].second;
              k = j;
            }
          }
          blocked[k] = true;
        }
        for (int i = 0; i < down; i++) {
          double downmost = INF;
          int k = 0;
          for (int j = 0; j < n; j++) {
            if (blocked[j]) {
              continue;
            }
            if (data[j].second < downmost) {
              downmost = data[j].second;
              k = j;
            }
          }
          blocked[k] = true;
        }
        double leftmost = INF, rightmost = -INF, upmost = -INF, downmost = INF;
        vector<int> magic;
        for (int j = 0; j < n; j++) {
          if (blocked[j]) {
            continue;
          }
          magic.push_back(j);
          if (data[j].first < leftmost) {
            leftmost = data[j].first;
          }
          if (data[j].first > rightmost) {
            rightmost = data[j].first;
          }
          if (data[j].second > upmost) {
            upmost = data[j].second;
          }
          if (data[j].second < downmost) {
            downmost = data[j].second;
          }
        }
        if ((long long)(diff(leftmost, rightmost)) * diff(upmost, downmost) <
            X) {
          X = (long long)(diff(leftmost, rightmost)) * diff(upmost, downmost);
        }
      }
    }
  }
  cout << X << "\n";
}
void include_file() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
}
int main() {
  solution();
  return 0;
}
