#include <bits/stdc++.h>
using namespace std;
struct node {
  double x, y;
  int id;
};
node a[100003], b[100003], c[100003], d[100003];
int n, k, minx, maxx, miny, maxy;
bool vis[100003];
bool cmp1(node ta, node tb) { return ta.x < tb.x; }
bool cmp2(node ta, node tb) { return ta.x > tb.x; }
bool cmp3(node ta, node tb) { return ta.y < tb.y; }
bool cmp4(node ta, node tb) { return ta.y > tb.y; }
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) {
    int x1, x2, y1, y2;
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    a[i].id = i;
    a[i].x = (x1 + x2) / 2;
    a[i].y = (y1 + y2) / 2;
    b[i] = c[i] = d[i] = a[i];
  }
  sort(a + 1, a + n + 1, cmp1);
  sort(b + 1, b + n + 1, cmp2);
  sort(c + 1, c + n + 1, cmp3);
  sort(d + 1, d + n + 1, cmp4);
  memset(vis, false, sizeof(vis));
  long long ans = 1LL << 62;
  for (int i = 0; i <= k; i++) {
    for (int t = 1; t <= i; t++) vis[a[t].id] = true;
    for (int j = 0; j <= k - i; j++) {
      for (int t = 1; t <= j; t++) vis[b[t].id] = true;
      for (int r = 0; r <= k - i - j; r++) {
        for (int t = 1; t <= r; t++) vis[c[t].id] = true;
        for (int t = 1; t <= k - i - j - r; t++) vis[d[t].id] = true;
        double minx = 1 << 30, maxx = -1 << 30, miny = 1 << 30, maxy = -1 << 30;
        for (int t = 1; t <= n; t++)
          if (!vis[a[t].id]) {
            minx = min(minx, a[t].x);
            maxx = max(maxx, a[t].x);
            miny = min(miny, a[t].y);
            maxy = max(maxy, a[t].y);
          }
        long long chang = maxx - minx + 0.9;
        long long kuan = maxy - miny + 0.9;
        if (chang == 0) chang = 1;
        if (kuan == 0) kuan = 1;
        ans = min(ans, chang * kuan);
        for (int t = 1; t <= r; t++) vis[c[t].id] = false;
        for (int t = 1; t <= k - i - j - r; t++) vis[d[t].id] = false;
      }
      for (int t = 1; t <= j; t++) vis[b[t].id] = false;
    }
    for (int t = 1; t <= i; t++) vis[a[t].id] = false;
  }
  cout << ans << endl;
  return 0;
}
