#include <bits/stdc++.h>
const long long MAXN = 1e5 + 5;
struct Point {
  double x, y;
  long long id;
  Point(double x = 0, double y = 0, long long id = 0) : x(x), y(y), id(id) {}
} p0[MAXN], p1[MAXN];
long long n, k;
inline bool chk(long long a, long long b, long long c, long long d) {
  std::set<long long> S;
  if (p1[a + 1].y < p1[n - b].y || p0[c + 1].x > p0[n - d].x) return false;
  for (long long i = 1; i <= a; ++i) S.insert(p1[i].id);
  for (long long i = n; i >= n - b + 1; --i) S.insert(p1[i].id);
  for (long long i = 1; i <= c; ++i) S.insert(p0[i].id);
  for (long long i = n; i >= n - d + 1; --i) S.insert(p0[i].id);
  return S.size() <= k;
}
signed main() {
  scanf("%lld%lld", &n, &k);
  for (long long i = 1; i <= n; ++i) {
    long long x1, y1, x2, y2;
    scanf("%lld%lld%lld%lld", &x1, &y1, &x2, &y2);
    p0[i] = p1[i] = Point((x1 + x2) / 2.0, (y1 + y2) / 2.0, i);
  }
  std::sort(p0 + 1, p0 + n + 1,
            [](const Point &a, const Point &b) -> bool { return a.x < b.x; });
  std::sort(p1 + 1, p1 + n + 1,
            [](const Point &a, const Point &b) -> bool { return a.y > b.y; });
  long long ans = 1e18;
  for (long long a = 0; a <= k; ++a) {
    for (long long b = 0; b <= k; ++b) {
      for (long long c = 0; c <= k; ++c) {
        for (long long d = 0; d <= k; ++d) {
          if (!chk(a, b, c, d)) continue;
          double up = p1[a + 1].y, down = p1[n - b].y;
          double lft = p0[c + 1].x, rit = p0[n - d].x;
          long long a = (up - down + 0.5), b = (rit - lft + 0.5);
          if (!a) a = 1;
          if (!b) b = 1;
          ans = std::min(ans, a * b);
        }
      }
    }
  }
  printf("%lld\n", ans);
  return 0;
}
