#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T sqr(T x) {
  return x * x;
}
const double EPS = 1e-6;
const int INF = 0x3fffffff;
const long long LINF = INF * 1ll * INF;
const double PI = acos(-1.0);
using namespace std;
pair<long long, long long> p[100005], p1[100005];
long long a[100005];
int n, k;
long long check(long long xl, long long xr) {
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if (xl <= p1[i].second && p1[i].second <= xr) {
      a[cnt++] = p1[i].first;
    }
  }
  if (cnt < n - k) return LINF;
  long long lenX = (xr - xl + 1) >> 1;
  long long lenY = LINF;
  for (int i = 0; i < cnt; i++) {
    if (i + n - k - 1 >= cnt) continue;
    lenY = min(lenY, (a[i + n - k - 1] - a[i] + 1) >> 1);
  }
  lenX = max(lenX, 1ll);
  lenY = max(lenY, 1ll);
  return 1ll * lenX * lenY;
}
int main(void) {
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n; i++) {
    long long x1, y1, x2, y2;
    scanf("%lld %lld %lld %lld", &x1, &y1, &x2, &y2);
    x1 <<= 1, x2 <<= 1, y1 <<= 1, y2 <<= 1;
    p[i] = make_pair((x1 + x2) >> 1, (y1 + y2) >> 1);
    p1[i] = make_pair((y1 + y2) >> 1, (x1 + x2) >> 1);
  }
  sort(p, p + n);
  sort(p1, p1 + n);
  long long ans = LINF;
  for (int i = 0; i < n && i <= k; i++) {
    for (int j = n - 1; i <= j && j >= n - 1 - k; j--) {
      ans = min(ans, check(p[i].first, p[j].first));
    }
  }
  printf("%lld\n", ans);
  return 0;
}
