#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
struct Node {
  int x, y, id;
  Node(int _x, int _y, int _id) : x(_x), y(_y), id(_id) {}
};
int vis[100005];
vector<Node> a[4];
const bool cmp0(const Node &n1, const Node &n2) { return n1.x < n2.x; }
const bool cmp1(const Node &n1, const Node &n2) { return n1.x > n2.x; }
const bool cmp2(const Node &n1, const Node &n2) { return n1.y < n2.y; }
const bool cmp3(const Node &n1, const Node &n2) { return n1.y > n2.y; }
int main() {
  int n, k;
  while (scanf("%d%d", &n, &k) != EOF) {
    memset(vis, 0, sizeof(vis));
    int x1, x2, y1, y2;
    for (int i = 1; i <= n; i++) {
      scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
      int x = x1 + x2;
      int y = y1 + y2;
      for (int j = 0; j <= 3; j++) a[j].push_back(Node(x, y, i));
    }
    sort(a[0].begin(), a[0].end(), cmp0);
    sort(a[1].begin(), a[1].end(), cmp1);
    sort(a[2].begin(), a[2].end(), cmp2);
    sort(a[3].begin(), a[3].end(), cmp3);
    int up = k, p, cnt;
    long long ans = inf;
    int ff = 1;
    for (int i = 0; i <= k; i++) {
      vector<int> t0;
      for (p = 0, cnt = 0; cnt < i && p < n; p++) {
        if (vis[a[0][p].id]) continue;
        vis[a[0][p].id] = 1;
        t0.push_back(a[0][p].id);
        cnt++;
      }
      for (int j = 0; j <= k - i; j++) {
        vector<int> t1;
        for (p = 0, cnt = 0; cnt < j && p < n; p++) {
          if (vis[a[1][p].id]) continue;
          vis[a[1][p].id] = 1;
          t1.push_back(a[1][p].id);
          cnt++;
        }
        for (int s = 0; s <= k - i - j; s++) {
          vector<int> t2;
          for (p = 0, cnt = 0; cnt < s && p < n; p++) {
            if (vis[a[2][p].id]) continue;
            vis[a[2][p].id] = 1;
            t2.push_back(a[2][p].id);
            cnt++;
          }
          for (int f = 0; f <= k - i - j - s; f++) {
            vector<int> t3;
            for (p = 0, cnt = 0; cnt < f && p < n; p++) {
              if (vis[a[3][p].id]) continue;
              vis[a[3][p].id] = 1;
              t3.push_back(a[3][p].id);
              cnt++;
            }
            for (int p = 0; p <= n - 1; p++) {
              if (vis[a[0][p].id])
                continue;
              else {
                x1 = a[0][p].x;
                break;
              }
            }
            for (int p = 0; p <= n - 1; p++) {
              if (vis[a[1][p].id])
                continue;
              else {
                x2 = a[1][p].x;
                break;
              }
            }
            for (int p = 0; p <= n - 1; p++) {
              if (vis[a[2][p].id])
                continue;
              else {
                y1 = a[2][p].y;
                break;
              }
            }
            for (int p = 0; p <= n - 1; p++) {
              if (vis[a[3][p].id])
                continue;
              else {
                y2 = a[3][p].y;
                break;
              }
            }
            long long sx = x2 - x1;
            if (sx % 2) sx++;
            sx /= 2;
            long long sy = y2 - y1;
            if (sy % 2) sy++;
            sy /= 2;
            sx = max(sx, 1LL);
            sy = max(sy, 1LL);
            ans = min(ans, sx * sy);
            for (int p = 0; p < t3.size(); p++) vis[t3[p]] = 0;
          }
          for (int p = 0; p < t2.size(); p++) vis[t2[p]] = 0;
        }
        for (int p = 0; p < t1.size(); p++) vis[t1[p]] = 0;
      }
      for (int p = 0; p < t0.size(); p++) vis[t0[p]] = 0;
    }
    printf("%I64d\n", ans);
  }
  return 0;
}
