#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
pair<int, int> xs[100000];
pair<int, int> ys[100000];
int vis[100000];
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n; i++) {
    int x1, x2, y1, y2;
    scanf("%d %d %d %d", &x1, &y1, &x2, &y2);
    xs[i] = make_pair(x1 + x2, i);
    ys[i] = make_pair(y1 + y2, i);
  }
  sort(xs, xs + n);
  sort(ys, ys + n);
  memset(vis, 0, sizeof(vis));
  int mark = 0;
  long long _min = 5000000000000000000LL;
  for (int x = 0; x <= k; x++) {
    for (int y = 0; y <= k - x; y++) {
      for (int z = 0; z <= k - x - y; z++) {
        mark++;
        int w = k - x - y - z;
        int cnt = 0;
        int i = 0;
        while (1) {
          if (vis[xs[i].second] == mark) {
            i++;
            continue;
          }
          if (cnt == x) break;
          vis[xs[i].second] = mark;
          i++;
          cnt++;
        }
        int xmin = xs[i].first;
        cnt = 0;
        i = n - 1;
        while (1) {
          if (vis[xs[i].second] == mark) {
            i--;
            continue;
          }
          if (cnt == y) break;
          vis[xs[i].second] = mark;
          i--;
          cnt++;
        }
        int xmax = xs[i].first;
        cnt = 0;
        i = 0;
        while (1) {
          if (vis[ys[i].second] == mark) {
            i++;
            continue;
          }
          if (cnt == z) break;
          vis[ys[i].second] = mark;
          i++;
          cnt++;
        }
        int ymin = ys[i].first;
        cnt = 0;
        i = n - 1;
        while (1) {
          if (vis[ys[i].second] == mark) {
            i--;
            continue;
          }
          if (cnt == w) break;
          vis[ys[i].second] = mark;
          i--;
          cnt++;
        }
        int ymax = ys[i].first;
        long long dx = max(xmax - xmin, 2);
        if (dx % 2) dx++;
        long long dy = max(ymax - ymin, 2);
        if (dy % 2) dy++;
        _min = min(_min, dx * dy);
      }
    }
  }
  printf("%I64d", _min / 4);
}
