#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000002;
const long long INFLL = 5000000000000000000ll;
const long long MOD = 1000000007;
int N, K, T[100005], X[100005], Y[100005], idx[4];
queue<int> Q;
vector<int> V[4];
bool sort_l(int i1, int i2) { return X[i1] < X[i2]; }
bool sort_r(int i1, int i2) { return X[i1] > X[i2]; }
bool sort_u(int i1, int i2) { return Y[i1] < Y[i2]; }
bool sort_d(int i1, int i2) { return Y[i1] > Y[i2]; }
void take(int d) {
  while (T[V[d][idx[d]]]) idx[d]++;
  Q.push(V[d][idx[d]]);
  T[V[d][idx[d]]] = 1;
  idx[d]++;
}
int main() {
  cin >> N >> K;
  for (int i = (1); i <= (N); i++) {
    long long x1, y1, x2, y2;
    scanf("%I64d %I64d %I64d %I64d", &x1, &y1, &x2, &y2);
    x1 *= 2, y1 *= 2, x2 *= 2, y2 *= 2;
    X[i] = (x1 + x2) / 2;
    Y[i] = (y1 + y2) / 2;
    for (int d = (0); d <= (3); d++) V[d].push_back(i);
  }
  sort(V[0].begin(), V[0].end(), sort_l);
  sort(V[1].begin(), V[1].end(), sort_r);
  sort(V[2].begin(), V[2].end(), sort_u);
  sort(V[3].begin(), V[3].end(), sort_d);
  long long area = INFLL;
  for (int m = (0); m <= (1 << (2 * K)); m++) {
    for (int d = (0); d <= (3); d++) idx[d] = 0;
    for (int b = 0; b < 2 * K; b += 2) {
      int b1 = m & (1 << b) ? 1 : 0;
      int b2 = m & (1 << (b + 1)) ? 1 : 0;
      int d = 2 * b1 + b2;
      take(d);
    }
    for (int d = (0); d <= (3); d++)
      while (idx[d] < ((int)V[d].size()) && T[V[d][idx[d]]]) idx[d]++;
    long long dx = X[V[1][idx[1]]] - X[V[0][idx[0]]];
    long long dy = Y[V[3][idx[3]]] - Y[V[2][idx[2]]];
    dx = max(dx, 2ll);
    dy = max(dy, 2ll);
    area = min(area, dx * dy);
    while (!Q.empty()) {
      int idx = Q.front();
      Q.pop();
      T[idx] = 0;
    }
  }
  cout << area / 4;
}
