#include <bits/stdc++.h>
using namespace std;
struct Point {
  long long x, y;
  int id;
};
vector<Point> vx1, vy1, vx2, vy2;
int n, k;
vector<bool> used;
bool cmpx1(const Point& a, const Point& b) { return a.x < b.x; }
bool cmpx2(const Point& a, const Point& b) { return a.x > b.x; }
bool cmpy1(const Point& a, const Point& b) { return a.y < b.y; }
bool cmpy2(const Point& a, const Point& b) { return a.y > b.y; }
long long ans;
void rec(int px1, int px2, int py1, int py2, int m) {
  while (used[vx1[px1].id]) px1++;
  while (used[vx2[px2].id]) px2++;
  while (used[vy1[py1].id]) py1++;
  while (used[vy2[py2].id]) py2++;
  if (m == k) {
    long long area =
        max(2ll, vx2[px2].x - vx1[px1].x) * max(2ll, vy2[py2].y - vy1[py1].y);
    ans = min(ans, area);
    return;
  }
  used[vx1[px1].id] = true;
  rec(px1 + 1, px2, py1, py2, m + 1);
  used[vx1[px1].id] = false;
  used[vx2[px2].id] = true;
  rec(px1, px2 + 1, py1, py2, m + 1);
  used[vx2[px2].id] = false;
  used[vy1[py1].id] = true;
  rec(px1, px2, py1 + 1, py2, m + 1);
  used[vy1[py1].id] = false;
  used[vy2[py2].id] = true;
  rec(px1, px2, py1, py2 + 1, m + 1);
  used[vy2[py2].id] = false;
}
int main() {
  cin >> n >> k;
  used = vector<bool>(n);
  for (int i = 0; i < (int)(n); i++) {
    int x1, y1, x2, y2;
    scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
    Point p;
    p.x = (2ll * x1 + 2ll * x2) / 2;
    p.y = (2ll * y1 + 2ll * y2) / 2;
    p.id = i;
    vx1.push_back(p);
  }
  vx2 = vy1 = vy2 = vx1;
  sort(vx1.begin(), vx1.end(), cmpx1);
  sort(vx2.begin(), vx2.end(), cmpx2);
  sort(vy1.begin(), vy1.end(), cmpy1);
  sort(vy2.begin(), vy2.end(), cmpy2);
  ans = 8e18;
  rec(0, 0, 0, 0, 0);
  cout << ans / 4 << endl;
  return 0;
}
