#include <bits/stdc++.h>
using namespace std;
namespace fastIO {
bool IOerror = 0;
inline char nc() {
  static char buf[100000], *p1 = buf + 100000, *pend = buf + 100000;
  if (p1 == pend) {
    p1 = buf;
    pend = buf + fread(buf, 1, 100000, stdin);
    if (pend == p1) {
      IOerror = 1;
      return -1;
    }
  }
  return *p1++;
}
inline bool blank(char ch) {
  return ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t';
}
inline long long read() {
  bool sign = 0;
  char ch = nc();
  long long x = 0;
  for (; blank(ch); ch = nc())
    ;
  if (IOerror) return 0;
  if (ch == '-') sign = 1, ch = nc();
  for (; ch >= '0' && ch <= '9'; ch = nc()) x = x * 10 + ch - '0';
  if (sign) x = -x;
  return x;
}
};  // namespace fastIO
using namespace fastIO;
struct node {
  long long x, y, id;
} e[1000010];
long long xx[1000010], yy[1000010];
bool cmp(node e1, node e2) { return e1.x < e2.x; }
bool cmp1(node e1, node e2) { return e1.y < e2.y; }
vector<long long> v1, v2, v3, v4;
signed main() {
  long long n = read(), k = read();
  for (long long i = 1; i <= n; i++) {
    e[i].x = read(), e[i].y = read();
    e[i].id = i;
    e[i].x += read(), e[i].y += read();
    xx[i] = e[i].x, yy[i] = e[i].y;
  }
  sort(e + 1, e + 1 + n, cmp);
  v1.push_back(-1), v2.push_back(-1), v3.push_back(-1), v4.push_back(-1);
  for (long long i = 1; i <= k + 1; i++) v1.push_back(e[i].id);
  for (long long i = n; i >= n - k; i--) v2.push_back(e[i].id);
  sort(e + 1, e + 1 + n, cmp1);
  for (long long i = 1; i <= k + 1; i++) v3.push_back(e[i].id);
  for (long long i = n; i >= n - k; i--) v4.push_back(e[i].id);
  long long ans = 5e18;
  for (long long x1 = 0; x1 <= k; x1++) {
    for (long long x2 = 0; x2 <= k; x2++) {
      for (long long x3 = 0; x3 <= k; x3++) {
        for (long long x4 = 0; x4 <= k; x4++) {
          set<long long> s;
          s.clear();
          for (long long i = 1; i <= x1; i++) s.insert(v1[i]);
          for (long long i = 1; i <= x2; i++) s.insert(v2[i]);
          for (long long i = 1; i <= x3; i++) s.insert(v3[i]);
          for (long long i = 1; i <= x4; i++) s.insert(v4[i]);
          if (s.size() <= k) {
            if (xx[v1[x1 + 1]] <= xx[v2[x2 + 1]] &&
                yy[v3[x3 + 1]] <= yy[v4[x4 + 1]]) {
              long long a = (xx[v2[x2 + 1]] - xx[v1[x1 + 1]]),
                        b = (yy[v4[x4 + 1]] - yy[v3[x3 + 1]]);
              a += a % 2, b += b % 2;
              a /= 2, b /= 2;
              a += (a == 0);
              b += (b == 0);
              ans = min(ans, a * b);
            }
          }
        }
      }
    }
  }
  cout << ans;
  return 0;
}
