#include <bits/stdc++.h>
using namespace std;
int x[100406], y[100406];
struct point {
  int x, y;
  int id;
};
bool comp(point t1, point t2) {
  if (t1.x == t2.x) return t1.y < t2.y;
  return t1.x < t2.x;
}
bool dead[100406];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, l;
  cin >> n >> l;
  vector<point> up, down, left, right;
  for (int i = 0; i < n; i++) {
    int x1, x2, y1, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    int x = (x1 + x2), y = (y1 + y2);
    point u, l;
    u = {x, y, i};
    l = {y, x, i};
    up.push_back(u);
    down.push_back(u);
    left.push_back(l);
    right.push_back(l);
  }
  long long int ans = INT64_MAX;
  sort(left.begin(), left.end(), comp);
  sort(right.begin(), right.end(), comp);
  reverse(right.begin(), right.end());
  sort(up.begin(), up.end(), comp);
  sort(down.begin(), down.end(), comp);
  reverse(down.begin(), down.end());
  for (int i = 0; i < l + 1; i++) {
    for (int j = 0; j < l - i + 1; j++) {
      for (int k = 0; k < l - i - j + 1; k++) {
        vector<int> dead1;
        int ht, dpth, lft, rt;
        int point = 0, done = 0;
        do {
          if (dead[up[point].id]) {
            point++;
          } else if (done < i) {
            dead[up[point].id] = true;
            dead1.push_back(up[point].id);
            point++;
            done++;
          }
        } while (done < i || dead[up[point].id]);
        ht = up[point].x;
        point = 0, done = 0;
        do {
          if (dead[down[point].id]) {
            point++;
          } else if (done < j) {
            dead[down[point].id] = true;
            dead1.push_back(down[point].id);
            done++;
            point++;
          }
        } while (done < j || dead[down[point].id]);
        dpth = down[point].x;
        point = 0, done = 0;
        do {
          if (dead[left[point].id]) {
            point++;
          } else if (done < k) {
            dead[left[point].id] = true;
            dead1.push_back(left[point].id);
            done++;
            point++;
          }
        } while (done < k || dead[left[point].id]);
        lft = left[point].x;
        int m = l - (i + j + k);
        point = 0, done = 0;
        do {
          if (dead[right[point].id]) {
            point++;
          } else if (done < m) {
            dead[right[point].id] = true;
            dead1.push_back(right[point].id);
            done++;
            point++;
          }
        } while (done < m || dead[right[point].id]);
        rt = right[point].x;
        long long int breadt = (abs(ht - dpth) + .5) / 2,
                      width = (0.5 + abs(lft - rt)) / 2;
        if (width == 0) width++;
        if (breadt == 0) breadt++;
        ans = ((ans > breadt * width) ? breadt * width : ans);
        for (int c = 0; c < dead1.size(); c++) dead[dead1[c]] = false;
      }
    }
  }
  cout << ans;
  return 0;
}
