#include <bits/stdc++.h>
using namespace std;
struct point {
  long long x, y;
  int i;
  bool operator<(const point &rhs) const {
    return (x == rhs.x) ? (y < rhs.y) : (x < rhs.x);
  }
} a[100005], b[100005];
bool cmpX(const point &a, const point &b) { return a.x < b.x; }
bool cmpY(const point &a, const point &b) { return a.y < b.y; }
int tb[100005];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  if (n == 1) {
    printf("1");
    return 0;
  }
  for (int i = 0; i < n; i++) {
    int x1, y1, x2, y2;
    scanf("%lld%lld%lld%lld", &x1, &y1, &x2, &y2);
    a[i] = b[i] = {x1 + x2, y1 + y2, i};
  }
  sort(a, a + n, cmpX);
  sort(b, b + n, cmpY);
  memset(tb, -1, sizeof tb);
  long long ans = (a[n - 1].x - a[0].x) * (b[n - 1].y - b[0].y);
  for (int i = 0; i < (1 << (k + k)); i++) {
    int px = 0, qx = n - 1;
    int py = 0, qy = n - 1;
    for (int j = 0; j < k + k; j += 2) {
      int t1 = ((1 << j) & i), t2 = ((1 << (j + 1)) & i);
      if (t1 && t2) {
        tb[a[px++].i] = i;
      } else if (t1 && !t2) {
        tb[a[qx--].i] = i;
      } else if (!t1 && t2) {
        tb[b[py++].i] = i;
      } else {
        tb[b[qy--].i] = i;
      }
      while (tb[a[px].i] == i) px++;
      while (tb[a[qx].i] == i) qx--;
      while (tb[b[py].i] == i) py++;
      while (tb[b[qy].i] == i) qy--;
    }
    long long w = (a[qx].x - a[px].x) / 2 + (a[qx].x - a[px].x) % 2;
    long long h = (b[qy].y - b[py].y) / 2 + (b[qy].y - b[py].y) % 2;
    if (w == 0) w = 1;
    if (h == 0) h = 1;
    ans = min(ans, h * w);
  }
  printf("%lld", ans);
  return 0;
}
