#include <bits/stdc++.h>
using namespace std;
struct node {
  int x, y, id;
  node() {}
  node(int _x, int _y, int _id) : x(_x), y(_y), id(_id) {}
};
node d[4][100000 + 10];
bool cmp1(node a, node b) { return a.x < b.x; }
bool cmp2(node a, node b) { return a.x > b.x; }
bool cmp3(node a, node b) { return a.y < b.y; }
bool cmp4(node a, node b) { return a.y > b.y; }
int n, k;
long long ans;
bool used[100000 + 10];
void dfs(int cur) {
  if (cur == k) {
    long long h = 0, w = 0;
    int flag = 1;
    for (int i = 0; i < 4; i++) {
      flag = -flag;
      for (int j = 0; j < n; j++)
        if (!used[d[i][j].id]) {
          if (i < 2)
            h += flag * d[i][j].x;
          else
            w += flag * d[i][j].y;
          break;
        }
    }
    w = (w + 1) / 2;
    h = (h + 1) / 2;
    h = max(1ll, h);
    w = max(1ll, w);
    ans = min(ans, h * w);
    return;
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < n; j++)
      if (!used[d[i][j].id]) {
        used[d[i][j].id] = 1;
        dfs(cur + 1);
        used[d[i][j].id] = 0;
        break;
      }
  }
}
int main() {
  cin >> n >> k;
  int x1, y1, x2, y2;
  for (int i = 0; i < n; i++) {
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    node t = node(x1 + x2, y1 + y2, i);
    d[0][i] = d[1][i] = d[2][i] = d[3][i] = t;
  }
  sort(d[0], d[0] + n, cmp1);
  sort(d[1], d[1] + n, cmp2);
  sort(d[2], d[2] + n, cmp3);
  sort(d[3], d[3] + n, cmp4);
  ans = 1000000000000000000ll;
  dfs(0);
  cout << ans << endl;
  return 0;
}
