#include <bits/stdc++.h>
template <typename T>
void UpdateMin(T& a, const T b) {
  a = std::min(a, b);
}
template <typename T>
void UpdateMax(T& a, const T b) {
  a = std::max(a, b);
}
static const long double Eps = 1.0e-09;
template <typename T>
bool IsEqual(const T a, const T b) {
  return std::abs(a - b) < Eps;
}
template <typename T>
bool IsGreater(const T a, const T b) {
  return a > b + Eps;
}
template <typename T>
bool IsLess(const T a, const T b) {
  return a + Eps < b;
}
template <typename T>
std::string ToStr(const T& val) {
  std::ostringstream ostr;
  ostr << val;
  return ostr.str();
}
template <typename T>
bool FromStr(const std::string& str, T& val) {
  std::istringstream istr(str);
  istr >> val;
  return !!istr;
}
template <typename T>
std::istream& operator>>(std::istream& ist, std::vector<T>& data) {
  ;
  for (size_t i = 0; i < data.size(); i++) {
    ist >> data[i];
  }
  return ist;
}
template <typename T>
T Read(std::istream& ist) {
  ;
  T val;
  ist >> val;
  return val;
}
template <typename T>
std::ostream& operator<<(std::ostream& ost, const std::vector<T>& data) {
  for (size_t i = 0; i < data.size(); i++) {
    if (i != 0) {
      ost << ' ';
    }
    ost << data[i];
  }
  return ost;
}
template <size_t id>
class StopWatch {};
struct pt_t {
  pt_t() : x(0), y(0), index(0) {}
  int64_t x;
  int64_t y;
  size_t index;
};
struct LessX {
  bool operator()(const pt_t& lv, const pt_t& rv) const { return lv.x < rv.x; }
};
struct LessY {
  bool operator()(const pt_t& lv, const pt_t& rv) const { return lv.y < rv.y; }
};
int64_t MakeValidSide(int64_t d) {
  if (d == 0) return 1;
  return (d + 1) / 2;
}
int64_t GetSquare(const int64_t dx, const int64_t dy) {
  int64_t s = MakeValidSide(dx);
  s *= MakeValidSide(dy);
  return s;
}
bool IsValidAns(const std::vector<pt_t>& byX, const std::vector<pt_t>& byY,
                const size_t k, const size_t xBegin, const size_t xEnd,
                const size_t yBegin, const size_t yEnd, int64_t& square) {
  ;
  ;
  ;
  const size_t n = byX.size();
  std::set<size_t> indexes;
  for (size_t i = 0; i < xBegin; i++) {
    indexes.insert(byX[i].index);
    if (indexes.size() > k) return false;
  }
  for (size_t i = 0; i < xEnd; i++) {
    indexes.insert(byX[n - i - 1].index);
    if (indexes.size() > k) return false;
  }
  for (size_t i = 0; i < yBegin; i++) {
    indexes.insert(byY[i].index);
    if (indexes.size() > k) return false;
  }
  for (size_t i = 0; i < yEnd; i++) {
    indexes.insert(byY[n - i - 1].index);
    if (indexes.size() > k) return false;
  };
  ;
  const int64_t dx = byX[n - 1 - xEnd].x - byX[0 + xBegin].x;
  const int64_t dy = byY[n - 1 - yEnd].y - byY[0 + yBegin].y;
  square = GetSquare(dx, dy);
  return true;
}
int64_t GetAns(const std::vector<pt_t>& pts, const size_t k) {
  const size_t n = pts.size();
  if (k >= n - 1) return GetSquare(0, 0);
  std::vector<pt_t> byX(pts);
  std::vector<pt_t> byY(pts);
  std::sort(byX.begin(), byX.end(), LessX());
  std::sort(byY.begin(), byY.end(), LessY());
  int64_t bestAns = GetSquare(byX[n - 1].x - byX[0].x, byY[n - 1].y - byY[0].y);
  for (size_t xBegin = 0; xBegin <= k; xBegin++) {
    for (size_t xEnd = 0; xEnd <= k && xEnd + xBegin <= k; xEnd++) {
      for (size_t yBegin = 0; yBegin <= k; yBegin++) {
        for (size_t yEnd = 0; yEnd <= k && yEnd + yBegin <= k; yEnd++) {
          int64_t sq;
          if (IsValidAns(byX, byY, k, xBegin, xEnd, yBegin, yEnd, sq)) {
            if (bestAns > sq) {
              bestAns = sq;
            }
          }
        }
      }
    }
  }
  return bestAns;
}
bool Solve(std::istream& ist, std::ostream& ost, const bool multipleTestMode) {
  StopWatch<1> sw;
  (void)sw;
  size_t n, k;
  ist >> n >> k;
  if (multipleTestMode && !ist) return false;
  std::vector<pt_t> pts(n);
  for (size_t i = 0; i < n; i++) {
    int64_t x1, y1, x2, y2;
    ist >> x1 >> y1 >> x2 >> y2;
    pts[i].x = x1 + x2;
    pts[i].y = y1 + y2;
    pts[i].index = i;
  }
  const int64_t bestAns = GetAns(pts, k);
  ost << bestAns << std::endl;
  return multipleTestMode;
}
int main(int argc, const char* argv[]) {
  std::ios_base::sync_with_stdio(false);
  std::istream* ist = &std::cin;
  std::ostream* ost = &std::cout;
  std::unique_ptr<std::istream> fileInput;
  if (argc > 1) {
    fileInput.reset(new std::ifstream(argv[1]));
    if (!(*fileInput)) {
      std::cout << "File not found: " << argv[1] << std::endl;
    }
    ist = fileInput.get();
  }
  Solve(*ist, *ost, false);
}
