#include <bits/stdc++.h>
using namespace std;
long long i, j, k, m, M, n, s, co, ans = 9223372036854775807, f, len, T, r, t;
long long t1, t2, t3, t4, ii, iii, iiii, tx, ty;
set<long long> z;
struct A {
  double x, y;
  long long id;
} a[100001], b[100001];
int cmp1(A a, A b) { return a.x < b.x; }
int cmp2(A a, A b) { return a.y < b.y; }
int main() {
  scanf("%lld %lld", &n, &k);
  for (i = 1; i <= n; i++) {
    scanf("%lld %lld %lld %lld", &t1, &t2, &t3, &t4);
    a[i].x = 1.0 * (t1 + t3) / 2;
    a[i].y = 1.0 * (t2 + t4) / 2;
    a[i].id = i;
    b[i] = a[i];
  }
  sort(a + 1, a + n + 1, cmp1);
  sort(b + 1, b + n + 1, cmp2);
  for (i = 0; i <= k; i++)
    for (ii = 0; ii <= k; ii++)
      for (iii = 0; iii <= k; iii++)
        for (iiii = 0; iiii <= k; iiii++) {
          if (a[i + 1].x > a[n - ii].x || b[iii + 1].y > b[n - iiii].y)
            continue;
          for (j = 1; j <= i; j++) z.insert(a[j].id);
          for (j = n; j >= n - ii + 1; j--) z.insert(a[j].id);
          for (j = 1; j <= iii; j++) z.insert(b[j].id);
          for (j = n; j >= n - iiii + 1; j--) z.insert(b[j].id);
          if (z.size() > k) {
            z.clear();
            continue;
          }
          tx = ceil(a[n - ii].x - a[i + 1].x),
          ty = ceil(b[n - iiii].y - b[iii + 1].y);
          if (tx == 0) tx = 1;
          if (ty == 0) ty = 1;
          ans = min(ans, tx * ty);
          z.clear();
        }
  printf("%lld", ans);
  return 0;
}
