#include <bits/stdc++.h>
using namespace std;
pair<pair<int, int>, int> a[100005], b[100005];
int vis[100005];
int main() {
  int n, k, x1, x2, y1, y2;
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    b[i] = a[i] = {{x1 + x2, y1 + y2}, i};
  }
  sort(a, a + n);
  sort(b, b + n,
       [&](const pair<pair<int, int>, int>& x,
           const pair<pair<int, int>, int>& y) {
         return x.first.second < y.first.second;
       });
  long long ans = 1e18;
  int pass = 1;
  for (int i = 0; i <= k; i++)
    for (int j = 0; j + i <= k; j++)
      for (int l = 0; i + j + l <= k; l++) {
        int m = k - i - j - l;
        int i2 = 0, cnt = 0;
        while (cnt < i) {
          vis[a[i2].second] = pass;
          cnt++;
          i2++;
        }
        int j2 = n - 1;
        cnt = 0;
        while (vis[a[j2].second] == pass) j2--;
        while (cnt < j) {
          if (vis[a[j2].second] != pass) {
            vis[a[j2].second] = pass;
            cnt++;
          }
          j2--;
        }
        int l2 = 0;
        cnt = 0;
        while (vis[b[l2].second] == pass) l2++;
        while (cnt < l) {
          if (vis[b[l2].second] != pass) {
            vis[b[l2].second] = pass;
            cnt++;
          }
          l2++;
        }
        int m2 = n - 1;
        cnt = 0;
        while (vis[b[m2].second] == pass) m2--;
        while (cnt < m) {
          if (vis[b[m2].second] != pass) {
            vis[b[m2].second] = pass;
            cnt++;
          }
          m2--;
        }
        long long dx = max(2, a[j2].first.first - a[i2].first.first);
        long long dy = max(2, b[m2].first.second - b[l2].first.second);
        ans = min(ans, dx * dy / 4);
        pass++;
      }
  printf("%lld\n", ans);
  return 0;
}
