#include <bits/stdc++.h>
using namespace std;
struct PT {
  long long x, y;
  int del;
  PT(int x, int y) : x(x), y(y), del(0) {}
};
int ndel = 0;
vector<PT> pts;
int ordx[100001], ordy[100001];
int n, k;
struct compx {
  bool operator()(const int &a, const int &b) { return pts[a].x < pts[b].x; }
};
struct compy {
  bool operator()(const int &a, const int &b) { return pts[a].y < pts[b].y; }
};
void parse() {
  long long x1, y1, x2, y2;
  long long x, y;
  cin >> n >> k;
  pts.reserve(n);
  for (int i = 0; i < n; i++) {
    cin >> x1 >> y1 >> x2 >> y2;
    x = x1 + x2;
    y = y1 + y2;
    pts.push_back(PT(x, y));
    ordx[i] = i;
    ordy[i] = i;
  }
  sort(ordx, ordx + n, compx());
  sort(ordy, ordy + n, compy());
}
long long area() {
  long long xmin, xmax, ymin, ymax;
  for (int i = 0; i < n; i++)
    if (pts[ordx[i]].del != ndel) {
      xmin = pts[ordx[i]].x;
      break;
    }
  for (int i = n - 1; i >= 0; i--)
    if (pts[ordx[i]].del != ndel) {
      xmax = pts[ordx[i]].x;
      break;
    }
  for (int i = 0; i < n; i++)
    if (pts[ordy[i]].del != ndel) {
      ymin = pts[ordy[i]].y;
      break;
    }
  for (int i = n - 1; i >= 0; i--)
    if (pts[ordy[i]].del != ndel) {
      ymax = pts[ordy[i]].y;
      break;
    }
  long long w = xmax - xmin, h = ymax - ymin;
  if (w % 2) w++;
  if (h % 2) h++;
  if (w == 0) w = 2;
  if (h == 0) h = 2;
  return (w * h) / 4;
}
void delete_edges(int x1, int x2, int y1, int y2) {
  ndel++;
  int i;
  for (i = 0; i < x1; i++) pts[ordx[i]].del = ndel;
  int deleted = 0;
  for (i = n - 1; deleted < x2; i--)
    if (pts[ordx[i]].del != ndel) {
      pts[ordx[i]].del = ndel;
      deleted++;
    }
  deleted = 0;
  for (i = 0; deleted < y1; i++)
    if (pts[ordy[i]].del != ndel) {
      pts[ordy[i]].del = ndel;
      deleted++;
    }
  deleted = 0;
  for (i = n - 1; deleted < y2; i--)
    if (pts[ordy[i]].del != ndel) {
      pts[ordy[i]].del = ndel;
      deleted++;
    }
}
void solve() {
  long long m = -1;
  for (int i1 = 0; i1 <= k; i1++) {
    for (int i2 = 0; i2 <= k - i1; i2++) {
      for (int i3 = 0; i3 <= k - i1 - i2; i3++) {
        for (int i4 = 0; i4 <= k - i1 - i2 - i3; i4++) {
          delete_edges(i1, i2, i3, i4);
          long long ar = area();
          if (m < 0 || ar < m) {
            m = ar;
          }
        }
      }
    }
  }
  cout << m << endl;
}
int main() {
  parse();
  solve();
  return 0;
}
