#include <bits/stdc++.h>
const int N = 1e5 + 9;
int n, k;
int vis[N];
struct Node {
  int x, y;
  int id = 0;
  Node(int x_ = 0, int y_ = 0) : x(x_), y(y_) {}
} t[6][N];
bool cmpup(Node a, Node b) { return a.x < b.x; }
bool cmpdown(Node a, Node b) { return a.x > b.x; }
bool cmplef(Node a, Node b) { return a.y < b.y; }
bool cmprig(Node a, Node b) { return a.y > b.y; }
long long ans = 1000000000000000000LL;
void dfs(int cur, int sum) {
  if (cur > 4) {
    if (sum > k) return;
    int ret[5];
    for (int j = 1; j <= 4; ++j) {
      for (int i = 1; i <= k + 1; ++i) {
        if (!vis[t[j][i].id]) {
          ret[j] = i;
          break;
        }
      }
    }
    long long h = std::max(1, (abs(t[1][ret[1]].x - t[2][ret[2]].x) + 1) / 2),
              w = std::max(1, (abs(t[3][ret[3]].y - t[4][ret[4]].y) + 1) / 2);
    ans = std::min(ans, h * w);
    return;
  }
  for (int i = 0; i <= k; ++i) {
    if (i != 0) {
      vis[t[cur][i].id]++;
      if (vis[t[cur][i].id] == 1) ++sum;
    }
    dfs(cur + 1, sum);
  }
  for (int i = 0; i <= k; ++i) vis[t[cur][i].id]--;
}
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);
    t[1][i] = Node((x1 + x2), (y1 + y2));
    t[1][i].id = i;
    t[2][i] = t[3][i] = t[4][i] = t[1][i];
  }
  std::sort(t[1] + 1, t[1] + n + 1, cmpup);
  std::sort(t[2] + 1, t[2] + n + 1, cmpdown);
  std::sort(t[3] + 1, t[3] + n + 1, cmplef);
  std::sort(t[4] + 1, t[4] + n + 1, cmprig);
  dfs(1, 0);
  printf("%lld\n", ans);
  return 0;
}
