#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
const long long inf = 1e18;
const double eps = 1e-8;
struct point {
  double x, y;
  int id;
} c[maxn], a[maxn], b[maxn];
int n, limit;
bool can[maxn];
inline void init() { memset(can, 1, sizeof(can)); }
inline long long get() {
  double x1 = inf, x2 = 0, y1 = inf, y2 = 0;
  for (int i = 1; i <= n; i++) {
    if (can[i]) {
      x1 = min(a[i].x, x1);
      x2 = max(a[i].x, x2);
      y1 = min(a[i].y, y1);
      y2 = max(a[i].y, y2);
    }
  }
  long long x = x2 - x1 + eps, y = y2 - y1 + eps;
  if (x == 0) {
    x = 1;
  }
  if (y == 0) {
    y = 1;
  }
  return x * y;
}
inline void work(int x1, int x2, int x3, int x4) {
  int i = 1;
  while (x1) {
    if (can[b[i].id]) {
      can[b[i].id] = 0;
      x1--;
    }
    i++;
  }
  i = n;
  while (x2) {
    if (can[b[i].id]) {
      can[b[i].id] = 0;
      x2--;
    }
    i--;
  }
  i = 1;
  while (x3) {
    if (can[c[i].id]) {
      can[c[i].id] = 0;
      x3--;
    }
    i++;
  }
  i = n;
  while (x4) {
    if (can[c[i].id]) {
      can[c[i].id] = 0;
      x4--;
    }
    i--;
  }
}
inline bool cmp2(point a, point b) { return a.y < b.y; }
inline bool cmp1(point a, point b) { return a.x < b.x; }
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int main() {
  n = read();
  limit = read();
  for (int i = 1; i <= n; i++) {
    int x1 = read(), y1 = read(), x2 = read(), y2 = read();
    a[i] = (point){(double)(x1 + x2) / 2, (double)(y1 + y2) / 2, i};
    b[i] = a[i];
    c[i] = a[i];
  }
  long long ans = inf;
  sort(b + 1, b + 1 + n, cmp1);
  sort(c + 1, c + 1 + n, cmp2);
  for (int i = 0; i <= limit; i++) {
    for (int j = 0; j <= limit - i; j++) {
      for (int k = 0; k <= limit - i - j; k++) {
        int kk = limit - i - j - k;
        init();
        work(i, j, k, kk);
        ans = min(ans, get());
      }
    }
  }
  printf("%I64d\n", ans);
  return 0;
}
