#include <bits/stdc++.h>
using namespace std;
struct Point {
  int x, y, id;
};
const int N = 1e5 + 5;
int n, m;
Point id[4][N];
long long ans;
int cmpx(Point a, Point b) { return a.x < b.x; }
int cmpy(Point a, Point b) { return a.y < b.y; }
multiset<int> ex, ey;
int bo[N];
void dfs(int p, int m) {
  if (p >= 4) {
    int xr = *ex.rbegin(), xl = *ex.begin();
    int yr = *ey.rbegin(), yl = *ey.begin();
    xr = xr - xl;
    if (xr % 2 != 0) ++xr;
    yr = yr - yl;
    if (yr % 2 != 0) ++yr;
    if (xr == 0) xr = 2;
    if (yr == 0) yr = 2;
    ans = min(ans, ((long long)xr * yr) >> 2);
    return;
  }
  dfs(p + 1, m);
  vector<int> verx, very, bb;
  for (int i = 1; i <= n && m > 0; ++i)
    if (!bo[id[p][i].id]) {
      int x = id[p][i].x, y = id[p][i].y;
      bo[id[p][i].id] = 1;
      ex.erase(ex.find(x));
      ey.erase(ey.find(y));
      --m;
      dfs(p + 1, m);
      bb.push_back(id[p][i].id);
      verx.push_back(x);
      very.push_back(y);
    }
  for (int i = 0; i < bb.size(); ++i) bo[bb[i]] = 0;
  for (int i = 0; i < verx.size(); ++i) ex.insert(verx[i]);
  for (int i = 0; i < very.size(); ++i) ey.insert(very[i]);
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) {
    int x1, y1, x2, y2;
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    int x = x1 + x2;
    int y = y1 + y2;
    ex.insert(x);
    ey.insert(y);
    id[0][i].id = i;
    id[1][i].id = i;
    id[0][i].x = id[1][i].x = x;
    id[0][i].y = id[1][i].y = y;
  }
  sort(id[0] + 1, id[0] + n + 1, cmpx);
  memcpy(id[2], id[0], sizeof(id[0]));
  reverse(id[2] + 1, id[2] + n + 1);
  sort(id[1] + 1, id[1] + n + 1, cmpy);
  memcpy(id[3], id[1], sizeof(id[1]));
  reverse(id[3] + 1, id[3] + n + 1);
  ans = 1LL << 60;
  dfs(0, m);
  printf("%I64d\n", ans);
  return 0;
}
