#include <bits/stdc++.h>
using namespace std;
struct Point {
  long long x, y;
  Point() {}
  Point(long long _x, long long _y) {
    x = _x;
    y = _y;
  }
};
Point P[100005];
bool operator<(const Point &p1, const Point &p2) {
  if (p1.x != p2.x) return p1.x < p2.x;
  return p1.y < p2.y;
}
long long solve(const multiset<long long> &y, int k) {
  if (y.size() == 0) return 2;
  multiset<long long>::iterator b = y.begin(), e = y.end();
  e--;
  int ct = 0;
  while (ct < k && e != y.begin()) e--, ct++;
  long long ans = (1ULL << (63 - 1));
  while (e != y.end()) ans = min(ans, max(*e - *b, 2LL)), b++, e++;
  return ans;
}
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  int x1, y1, x2, y2;
  for (int i = 0; i < n; i++) {
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    P[i] = Point((x1 + x2), (y1 + y2));
  }
  sort(P, P + n);
  long long ans = (1ULL << (63 - 1));
  for (int i = 0; i <= k; i++) {
    multiset<long long> y;
    for (int l = 0, r = 0; l < n; l++) {
      if (l > 0) y.erase(y.find(P[l - 1].y));
      while (r < n && r - l + 1 <= n - i) y.insert(P[r].y), r++;
      ans = min(ans, max(2LL, (P[r - 1].x - P[l].x)) * solve(y, k - i));
      if (r == n) break;
    }
  }
  long long res = ans / 4;
  cout << res << endl;
}
