#include <bits/stdc++.h>
using namespace std;
const long long INF = 1.5 * 1e18;
struct data {
  double x, y;
  int id;
} p0[100010], p1[100010];
int n, k;
bool cmp1(const data &a, const data &b) { return a.x < b.x; }
bool cmp2(const data &a, const data &b) { return a.y < b.y; }
bool check(int lft, int rgt, int bot, int top) {
  set<int> del;
  for (int i = 0; i < lft; ++i) del.insert(p0[i].id);
  for (int i = n - rgt; i < n; ++i) del.insert(p0[i].id);
  for (int i = 0; i < bot; ++i) del.insert(p1[i].id);
  for (int i = n - top; i < n; ++i) del.insert(p1[i].id);
  if (del.size() <= k)
    return true;
  else
    return false;
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; ++i) {
    double x1, x2, y1, y2;
    scanf("%lf%lf%lf%lf", &x1, &y1, &x2, &y2);
    p0[i].x = p1[i].x = (x1 + x2) / 2;
    p0[i].y = p1[i].y = (y1 + y2) / 2;
    p0[i].id = p1[i].id = i;
  }
  sort(p0, p0 + n, cmp1);
  sort(p1, p1 + n, cmp2);
  long long ans = INF;
  for (int i1 = 0; i1 <= k; ++i1) {
    for (int i2 = 0; i2 <= k; ++i2) {
      for (int i3 = 0; i3 <= k; ++i3) {
        for (int i4 = 0; i4 <= k; ++i4) {
          if (check(i1, i2, i3, i4)) {
            double l0 = p0[i1].x;
            double r0 = p0[n - 1 - i2].x;
            double l1 = p1[i3].y;
            double r1 = p1[n - 1 - i4].y;
            long long d1 = (long long)(r0 - l0 + 0.5);
            long long d2 = (long long)(r1 - l1 + 0.5);
            if (d1 == 0) ++d1;
            if (d2 == 0) ++d2;
            ans = min(ans, d1 * d2);
          }
        }
      }
    }
  }
  cout << ans << endl;
}
