#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e5 + 10;
const long long INF = 2000000000000000000LL;
struct Point {
  int x, y;
  bool used;
  Point() : used(false) {}
};
bool x_cmp(Point *a, Point *b) { return a->x < b->x; }
bool y_cmp(Point *a, Point *b) { return a->y < b->y; }
Point points[MAX_N];
Point *xSort[MAX_N];
Point *ySort[MAX_N];
int pointCnt;
int maxRem;
void input() {
  scanf("%i %i", &pointCnt, &maxRem);
  for (int i = 0; i < pointCnt; i++) {
    int x1, y1, x2, y2;
    scanf("%i %i %i %i", &x1, &y1, &x2, &y2);
    points[i].x = (x1 + x2);
    points[i].y = (y1 + y2);
    xSort[i] = &points[i];
    ySort[i] = &points[i];
  }
  sort(xSort, xSort + pointCnt, x_cmp);
  sort(ySort, ySort + pointCnt, y_cmp);
}
inline int rem_cnt(int xLow, int xHigh, int yLow, int yHigh) {
  int remCnt = 0;
  for (int i = 0; i < xLow; i++) {
    remCnt++;
    xSort[i]->used = true;
  }
  for (int i = 0; i < xHigh; i++) {
    int ind = pointCnt - i - 1;
    if (not xSort[ind]->used) {
      xSort[ind]->used = true;
      remCnt++;
    }
  }
  for (int i = 0; i < yLow; i++) {
    if (not ySort[i]->used) {
      ySort[i]->used = true;
      remCnt++;
    }
  }
  for (int i = 0; i < yHigh; i++) {
    int ind = pointCnt - i - 1;
    if (not ySort[ind]->used) {
      ySort[ind]->used = true;
      remCnt++;
    }
  }
  return remCnt;
}
inline void rem_used(int xLow, int xHigh, int yLow, int yHigh) {
  for (int i = 0; i < xLow; i++) {
    xSort[i]->used = false;
  }
  for (int i = 0; i < xHigh; i++) {
    xSort[pointCnt - i - 1]->used = false;
  }
  for (int i = 0; i < yLow; i++) {
    ySort[i]->used = false;
  }
  for (int i = 0; i < yHigh; i++) {
    ySort[pointCnt - i - 1]->used = false;
  }
}
long long area(int xLow, int xHigh, int yLow, int yHigh) {
  if (rem_cnt(xLow, xHigh, yLow, yHigh) > maxRem) {
    rem_used(xLow, xHigh, yLow, yHigh);
    return INF;
  }
  int minX = xSort[xLow]->x;
  int maxX = xSort[pointCnt - xHigh - 1]->x;
  int minY = ySort[yLow]->y;
  int maxY = ySort[pointCnt - yHigh - 1]->y;
  long long xSide = maxX - minX;
  long long ySide = maxY - minY;
  xSide = (xSide & 1) ? ((xSide >> 1) + 1) : (xSide >> 1);
  ySide = (ySide & 1) ? ((ySide >> 1) + 1) : (ySide >> 1);
  if (xSide == 0) {
    xSide = 1;
  }
  if (ySide == 0) {
    ySide = 1;
  }
  rem_used(xLow, xHigh, yLow, yHigh);
  return xSide * ySide;
}
int main() {
  input();
  long long awns = INF;
  for (int x1 = 0; x1 <= maxRem; x1++) {
    for (int x2 = 0; x2 <= maxRem; x2++) {
      for (int y1 = 0; y1 <= maxRem; y1++) {
        for (int y2 = 0; y2 <= maxRem; y2++) {
          awns = min(awns, area(x1, x2, y1, y2));
        }
      }
    }
  }
  printf("%lli\n", awns);
}
