#include <bits/stdc++.h>
struct node {
  int x, y;
  int id;
  void operator=(node n) {
    x = n.x;
    y = n.y;
    id = n.id;
  }
  void push(int x1, int y1, int x2, int y2, int i) {
    x = x1 + x2;
    y = y1 + y2;
    id = i;
  }
};
bool point[110000];
node a[4][25];
int n, k;
long long ans;
bool cmp(int x1, int y1, int x2, int y2, int p, int i) {
  switch (p) {
    case 0:
      return x1 + x2 < a[p][i].x || a[p][i].x == 0;
      break;
    case 1:
      return x1 + x2 > a[p][i].x || a[p][i].x == 0;
      break;
    case 2:
      return y1 + y2 < a[p][i].y || a[p][i].y == 0;
      break;
    case 3:
      return y1 + y2 > a[p][i].y || a[p][i].y == 0;
      break;
  }
  return 1;
}
void dfs(int k, int t) {
  int num[25];
  if (t == 4) {
    int x1 = 2E9 + 1, x2 = 1, y1 = 2E9 + 1, y2 = 1;
    for (int i = 0; i < 4; i++)
      for (int j = 0; j < 20; j++)
        if (!point[a[i][j].id] && a[i][j].x) {
          if (a[i][j].x < x1) x1 = a[i][j].x;
          if (a[i][j].x > x2) x2 = a[i][j].x;
          if (a[i][j].y < y1) y1 = a[i][j].y;
          if (a[i][j].y > y2) y2 = a[i][j].y;
        }
    int dx = (x2 - x1 + 1) / 2;
    int dy = (y2 - y1 + 1) / 2;
    if (dx == 0) dx = 1;
    if (dy == 0) dy = 1;
    if ((long long)dx * dy <= ans) {
      ans = (long long)dx * dy;
    }
    return;
  }
  for (int i = 0; i <= k; i++) {
    int cnt = 0;
    for (int j = 0; j < 20 && cnt < i; j++) {
      if (!point[a[t][j].id] && a[t][j].x) {
        num[cnt++] = a[t][j].id;
        point[a[t][j].id] = 1;
      }
    }
    dfs(k - cnt, t + 1);
    for (int j = 0; j < cnt; j++) point[num[j]] = 0;
  }
}
int main() {
  int x1, x2, y1, y2;
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    for (int p = 0; p < 4; p++) {
      for (int j = 0; j < 20; j++)
        if (cmp(x1, y1, x2, y2, p, j)) {
          for (int q = 19; q > j; q--) a[p][q] = a[p][q - 1];
          a[p][j].push(x1, y1, x2, y2, i);
          break;
        }
    }
  }
  ans = (long long)4E18;
  dfs(k, 0);
  printf("%lld\n", ans);
}
