#include <bits/stdc++.h>
using namespace std;
struct node {
  long long x, y;
} A[100005];
int pos1[100005], pos2[100005], pos3[100005], pos4[100005];
int cmp1(int a, int b) { return A[a].x < A[b].x; }
int cmp2(int a, int b) { return A[a].x > A[b].x; }
int cmp3(int a, int b) { return A[a].y < A[b].y; }
int cmp4(int a, int b) { return A[a].y > A[b].y; }
int mark[100005];
int main() {
  int i, n, k, p1, p2, p3, p4;
  long long x1, x2, y1, y2;
  scanf("%d%d", &n, &k);
  for (i = 1; i <= n; ++i) {
    scanf("%lld%lld%lld%lld", &x1, &y1, &x2, &y2);
    A[i].x = x1 + x2;
    A[i].y = y1 + y2;
    pos1[i] = pos2[i] = pos3[i] = pos4[i] = i;
  }
  sort(pos1 + 1, pos1 + n + 1, cmp1);
  sort(pos2 + 1, pos2 + n + 1, cmp2);
  sort(pos3 + 1, pos3 + n + 1, cmp3);
  sort(pos4 + 1, pos4 + n + 1, cmp4);
  int now = 0, tot;
  long long ans = 1LL << 62;
  for (p1 = 0; p1 <= k; ++p1) {
    for (p2 = 0; p2 <= k; ++p2) {
      for (p3 = 0; p3 <= k; ++p3) {
        for (p4 = 0; p4 <= k; ++p4) {
          now++;
          tot = 0;
          for (i = 1; i <= p1; ++i)
            if (mark[pos1[i]] != now) mark[pos1[i]] = now, tot++;
          for (i = 1; i <= p2; ++i)
            if (mark[pos2[i]] != now) mark[pos2[i]] = now, tot++;
          for (i = 1; i <= p3; ++i)
            if (mark[pos3[i]] != now) mark[pos3[i]] = now, tot++;
          for (i = 1; i <= p4; ++i)
            if (mark[pos4[i]] != now) mark[pos4[i]] = now, tot++;
          if (tot != k) continue;
          long long max_x = -0x7fffffff, min_x = 0x7fffffff,
                    max_y = -0x7fffffff, min_y = 0x7fffffff;
          for (i = 1; i <= n; ++i)
            if (mark[i] != now) {
              max_x = (max_x > A[i].x ? max_x : A[i].x);
              min_x = (min_x > A[i].x ? A[i].x : min_x);
              max_y = (max_y > A[i].y ? max_y : A[i].y);
              min_y = (min_y > A[i].y ? A[i].y : min_y);
            }
          long long x = max_x - min_x, y = max_y - min_y;
          x = (2LL > x ? 2LL : x);
          y = (2LL > y ? 2LL : y);
          ans = (ans > x * y ? x * y : ans);
        }
      }
    }
  }
  printf("%lld\n", ans / 4);
  return 0;
}
