#include <bits/stdc++.h>
#define range(i, l, r) for(int (i) = (l); (i) < (r); (i)++)
#define reversed_range(i, l, r) for (int (i) = (r) - 1; (i) >= l; (i)--)
using namespace std;
template <typename T>
using vec = vector<T>;
using lint = long long;
using ulint = unsigned long long;
using pint = pair<int, int>;
using plint = pair<lint, lint>;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

template <typename S, typename T>
ostream& operator <<(ostream& os, pair<S, T> p) {
    os << "(";
    os << p.first << ", " << p.second;
    return os << ")";
}

template <typename T>
ostream& operator <<(ostream& os, vec<T> v) {
    os << "[";
    for (int i = 0; i < v.size() - 1; i++) {
        os << v.at(i) << ", ";
    }
    return os << v.at(v.size() - 1) << "]";
}

template <typename T>
ostream& operator <<(ostream& os, set<T>& s) {
    os << "{";
    auto it_first_item = s.begin();
    cout << *it_first_item;
    for (auto it = ++it_first_item; it != s.end(); it++) {
        cout << ", " << *it;
    }
    return cout << "}";
}

template <typename T>
ostream& operator <<(ostream& os, unordered_set<T>& s) {
    os << "{";
    auto it_first_item = s.begin();
    cout << *it_first_item;
    for (auto it = ++it_first_item; it != s.end(); it++) {
        cout << ", " << *it;
    }
    return cout << "}";
}

template <typename K, typename V>
ostream& operator <<(ostream& os, map<K, V> m) {
    os << "{";
    auto it_first_item = m.begin();
    cout << it_first_item->first << ": " << it_first_item->second;
    for (auto it = ++it_first_item; it != m.end(); it++) {
        cout << ", " << it->first << ": " << it->second;
    }
    return os << "}";
}

template <typename K, typename V>
ostream& operator <<(ostream& os, unordered_map<K, V> m) {
    os << "{";
    auto it_first_item = m.begin();
    cout << it_first_item->first << ": " << it_first_item->second;
    for (auto it = ++it_first_item; it != m.end(); it++) {
        cout << ", " << it->first << ": " << it->second;
    }
    return os << "}";
}

int main() {
    cin.tie(0); cout.tie(0);
    ios::sync_with_stdio(false);
    lint N, K;
    cin >> N >> K;
    vec<vec<lint>> coords(N);
    range(i, 0, N) {
        lint x, y;
        cin >> x >> y;
        coords.at(i) = {x, y};
    }
    lint min_area = (1LL << 62);
    range(i, 0, N) range(j, i, N) range(k, j, N) range(l, k, N) {
        if (l == i) continue;
        vec<lint> xs = {coords.at(i).at(0), coords.at(j).at(0), coords.at(k).at(0), coords.at(l).at(0)};
        vec<lint> ys = {coords.at(i).at(1), coords.at(j).at(1), coords.at(k).at(1), coords.at(l).at(1)};
        lint lx = xs[0], ux = xs[0];
        lint ly = ys[0], uy = ys[0];
        range(m, 1, 4) {
            lx = min(lx, xs[m]);
            ux = max(ux, xs[m]);
            ly = min(ly, ys[m]);
            uy = max(uy, ys[m]);
        }
        lint area = (ux - lx) * (uy - ly);
        lint n_in = 0;
        range(m, 0, N) {
            lint x = coords[m][0], y = coords[m][1];
            if (lx <= x && x <= ux && ly <= y && y <= uy) n_in++;
        }
        if (n_in >= K) min_area = min(min_area, area);
    }
    cout << min_area << "\n";
}

Measured memory_bytes: 256