#include <bits/stdc++.h>
using namespace std;
template <typename T>
T gcd(T first, T second) {
  while (second > 0) {
    first %= second;
    swap(first, second);
  }
  return first;
}
template <class _T>
inline _T sqr(const _T &first) {
  return first * first;
}
template <class _T>
inline string tostr(const _T &a) {
  ostringstream os("");
  os << a;
  return os.str();
}
const long double PI = 3.1415926535897932384626433832795L;
template <typename T>
inline void input(T &a) {
  static int ed;
  a = 0;
  while (!isdigit(ed = getchar()) && ed != '-') {
  }
  char neg = 0;
  if (ed == '-') {
    neg = 1;
    ed = getchar();
  }
  while (isdigit(ed)) {
    a = 10 * a + ed - '0';
    ed = getchar();
  }
  if (neg) a = -a;
}
template <typename T = int>
inline T nxt() {
  T res;
  input(res);
  return res;
}
mt19937 generator;
bool check(int v) {
  if (v == 1) return false;
  for (int i = 2; i * i <= v; ++i) {
    if (v % i == 0) {
      return false;
    }
  }
  return true;
}
long long pw(long long a, long long n, long long m) {
  long long res = 1;
  while (n) {
    if (n & 1ll) {
      res = res * a % m;
    }
    a = a * a % m;
    n >>= 1;
  }
  return res;
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
struct m {
  long long x12345, y12345;
  long long x2, y2;
};
int k;
vector<int> o[4];
int used[200000];
multiset<long long> x12345, y12345, x2, y2;
long long ans;
m first[200000];
void rec(int pos, int cnt) {
  if (cnt > k) return;
  if (pos == 4) {
    ans = min(ans, (max(1ll, (*x2.rbegin() - *x12345.begin() + 1) / 2)) *
                       max(1ll, ((*y2.rbegin() - *y12345.begin() + 1) / 2)));
    return;
  }
  rec(pos + 1, cnt);
  for (int i = 0; i < o[pos].size(); ++i) {
    int p1 = o[pos][i];
    if (!used[p1]) {
      x12345.erase(x12345.find(first[p1].x12345));
      x2.erase(x2.find(first[p1].x2));
      y12345.erase(y12345.find(first[p1].y12345));
      y2.erase(y2.find(first[p1].y2));
      ++cnt;
    }
    ++used[p1];
    rec(pos + 1, cnt);
  }
  for (int i = 0; i < o[pos].size(); ++i) {
    int p1 = o[pos][i];
    if (used[p1] == 1) {
      x12345.insert(first[p1].x12345);
      x2.insert(first[p1].x2);
      y12345.insert(first[p1].y12345);
      y2.insert(first[p1].y2);
      --cnt;
    }
    --used[p1];
  }
}
void solve() {
  int n = nxt();
  k = nxt();
  for (int i = 0; i < n; ++i) {
    first[i].x12345 = nxt();
    first[i].y12345 = nxt();
    first[i].x2 = nxt();
    first[i].y2 = nxt();
    first[i].x12345 = first[i].x2 = (first[i].x12345 + first[i].x2);
    first[i].y12345 = first[i].y2 = (first[i].y12345 + first[i].y2);
  }
  vector<int> o1, o2, o3, o4;
  for (int i = 0; i < n; ++i) {
    o1.push_back(i);
    o2.push_back(i);
    o3.push_back(i);
    o4.push_back(i);
  }
  sort((o1).begin(), (o1).end(),
       [&](int u, int v) { return first[u].x12345 < first[v].x12345; });
  sort((o2).begin(), (o2).end(),
       [&](int u, int v) { return first[u].y12345 < first[v].y12345; });
  sort((o3).begin(), (o3).end(),
       [&](int u, int v) { return first[u].x2 > first[v].x2; });
  sort((o4).begin(), (o4).end(),
       [&](int u, int v) { return first[u].y2 > first[v].y2; });
  o1.resize(k);
  o2.resize(k);
  o3.resize(k);
  o4.resize(k);
  o[0] = o1;
  o[1] = o2;
  o[2] = o3;
  o[3] = o4;
  for (int i = 0; i < n; ++i) {
    x12345.insert(first[i].x12345);
    x2.insert(first[i].x2);
    y12345.insert(first[i].y12345);
    y2.insert(first[i].y2);
  }
  ans = LLONG_MAX;
  rec(0, 0);
  cout << ans << "\n";
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
