#include <bits/stdc++.h>
using namespace std;
const int N = 300010;
const long long inf = 4e18;
int n, k, x1[N], var[N], x2[N], y2[N], x[N], y[N];
pair<pair<int, int>, int> px[N], py[N], py1[N];
long long ans;
long long solve(pair<pair<int, int>, int> *p, int n, int k, int w) {
  int j = n - k;
  long long res = inf;
  for (int i = 1; i <= k + 1; i++) {
    int yl = p[i].first.first;
    int yr = p[j].first.first;
    int h = yr - yl;
    if (h & 1) {
      h >>= 1;
      h++;
    } else {
      h >>= 1;
    }
    if (h == 0) h++;
    res = min(res, 1ll * w * h);
    j++;
  }
  return res;
}
void remove(pair<pair<int, int>, int> *p, int n, int val) {
  int j = -1;
  for (int i = 1; i <= n; i++)
    if (p[i].second == val) {
      j = i;
      break;
    }
  for (int i = j; i < n; i++) p[i] = p[i + 1];
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++)
    scanf("%d%d%d%d", &x1[i], &var[i], &x2[i], &y2[i]);
  for (int i = 1; i <= n; i++) {
    x[i] = x1[i] + x2[i];
    y[i] = var[i] + y2[i];
  }
  for (int i = 1; i <= n; i++) py[i] = make_pair(make_pair(y[i], x[i]), i);
  sort(py + 1, py + n + 1);
  for (int i = 1; i <= n; i++) px[i] = make_pair(make_pair(x[i], y[i]), i);
  sort(px + 1, px + n + 1);
  int n1 = n;
  ans = inf;
  for (int i = 1; i <= k + 1; i++) {
    int n2 = n1;
    for (int j = 1; j <= n2; j++) py1[j] = py[j];
    for (int j = n; j >= n - (k - (i - 1)); j--) {
      int xl = px[i].first.first;
      int xr = px[j].first.first;
      int w = xr - xl;
      if (w & 1) {
        w >>= 1;
        w++;
      } else {
        w >>= 1;
      }
      if (w == 0) w++;
      ans = min(ans, solve(py1, n2, k - (i - 1) - (n - j), w));
      remove(py1, n2, px[j].second);
      n2--;
    }
    remove(py, n1, px[i].second);
    n1--;
  }
  cout << ans;
  return 0;
}
