#include <bits/stdc++.h>
using namespace std;
struct point {
  point() {}
  point(int _x, int _y) : x(_x), y(_y) {}
  int x, y;
};
pair<point, int> sx[100100], sy[100100];
bool cmpx(pair<point, int> a, pair<point, int> b) {
  return a.first.x < b.first.x;
}
bool cmpy(pair<point, int> a, pair<point, int> b) {
  return a.first.y < b.first.y;
}
int del[100100];
int main() {
  long long ans = (1LL << 60);
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) {
    int x1, x2, y1, y2;
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    sx[i] = sy[i] = make_pair(point(x1 + x2, y1 + y2), i);
  }
  sort(sx, sx + n, cmpx);
  sort(sy, sy + n, cmpy);
  for (int ix = 0; ix <= k; ix++) {
    for (int jx = n - 1; jx >= n - 1 - (k - ix); jx--) {
      int dx = max(1, (sx[jx].first.x - sx[ix].first.x + 1) / 2);
      int now = ix + (n - 1 - jx);
      for (int iy = 0; iy <= k; iy++) {
        for (int jy = n - 1; jy >= n - 1 - k && jy >= iy; jy--) {
          int dy = max(1, (sy[jy].first.y - sy[iy].first.y + 1) / 2);
          if (now <= k) {
            ans = min(ans, 1LL * dx * dy);
          }
          if (!del[sy[jy].second]) now++;
          del[sy[jy].second]++;
        }
        for (int jy = n - 1; jy >= n - 1 - k && jy >= iy; jy--) {
          del[sy[jy].second]--;
          if (!del[sy[jy].second]) now--;
        }
        if (!del[sy[iy].second]) now++;
        del[sy[iy].second]++;
      }
      for (int iy = 0; iy <= k; iy++) {
        del[sy[iy].second]--;
        if (!del[sy[iy].second]) now--;
      }
      del[sx[jx].second]++;
    }
    for (int jx = n - 1; jx >= n - 1 - (k - ix); jx--) del[sx[jx].second]--;
    del[sx[ix].second]++;
  }
  printf("%I64d\n", ans);
  return 0;
}
