#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const long long INF = 1e18 + 10;
int vis1[N], vis2[N];
struct node {
  long long x, y;
  int id;
} v[N], w[N];
inline bool cmp1(node a, node b) { return a.x < b.x; }
inline bool cmp2(node a, node b) { return a.y < b.y; }
int main() {
  int n, m;
  long long a, b, c, d, ans = INF;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%lld%lld%lld%lld", &a, &b, &c, &d);
    v[i] = w[i] = (node){a + c, b + d, i};
  }
  sort(v + 1, v + n + 1, cmp1);
  sort(w + 1, w + n + 1, cmp2);
  for (int k1 = 0; k1 <= m; k1++) {
    for (int k2 = 0; k2 <= m - k1; k2++) {
      memset(vis1, 0, sizeof(vis1));
      for (int i = 1; i <= k1; i++) vis1[v[i].id] = 1;
      for (int i = n; i >= n - k2 + 1; i--) vis1[v[i].id] = 1;
      for (int k3 = 0; k3 <= m - k1 - k2; k3++) {
        memset(vis2, 0, sizeof(vis2));
        int k4 = m - k1 - k2 - k3, cnt1, cnt2;
        long long minx = INF, maxx = 0, miny = INF, maxy = 0;
        cnt1 = k3, cnt2 = k4;
        for (int i = 1; i <= n && cnt1; i++)
          if (!vis1[w[i].id]) vis2[w[i].id] = 1, cnt1--;
        for (int i = n; i >= 1 && cnt2; i--)
          if (!vis1[w[i].id]) vis2[w[i].id] = 1, cnt2--;
        for (int i = 1; i <= n; i++) {
          if (vis1[v[i].id] || vis2[v[i].id]) continue;
          minx = min(minx, v[i].x);
          maxx = max(maxx, v[i].x);
          miny = min(miny, v[i].y);
          maxy = max(maxy, v[i].y);
        }
        double l1 = max(maxx - minx, 2ll) / 2.00,
               l2 = max(maxy - miny, 2ll) / 2.00;
        ans = min(ans, (long long)ceil(l1) * (long long)ceil(l2));
      }
    }
  }
  printf("%lld\n", ans);
  return 0;
}
