#include <bits/stdc++.h>
using namespace std;
typedef struct {
  int x;
  int y;
  int id;
} point;
vector<point> h, v;
bool byX(const point &a, const point &b) { return a.x < b.x; }
bool byY(const point &a, const point &b) { return a.y < b.y; }
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    int x1, y1, x2, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    point p;
    p.x = x1 + x2;
    p.y = y1 + y2;
    p.id = i;
    h.push_back(p);
    v.push_back(p);
  }
  sort(h.begin(), h.end(), byX);
  sort(v.begin(), v.end(), byY);
  long long sol = 1e18;
  for (int l = 0; l <= k; ++l) {
    for (int r = 0; r <= k; ++r) {
      for (int u = 0; u <= k; ++u) {
        for (int d = 0; d <= k; ++d) {
          set<int> removed;
          for (int i = 0; i < l; ++i) removed.insert(h[i].id);
          for (int i = n - 1; i > n - 1 - r; --i) removed.insert(h[i].id);
          for (int i = 0; i < d; ++i) removed.insert(v[i].id);
          for (int i = n - 1; i > n - 1 - u; --i) removed.insert(v[i].id);
          if (removed.size() > k) continue;
          point L = h[l], R = h[n - 1 - r], D = v[d], U = v[n - 1 - u];
          long long dx = max(1LL, (R.x - L.x + 1LL) / 2LL);
          long long dy = max(1LL, (U.y - D.y + 1LL) / 2LL);
          sol = min(sol, dx * dy);
        }
      }
    }
  }
  cout << sol << endl;
  return 0;
}
