import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

int readint() {
    return readln.chomp.to!int;
}

int[] readints() {
    return readln.split.map!(to!int).array;
}

long calc(int k, int[][] ps) {
    ps.sort!((a, b) => a[0] < b[0]);

    long ans = long.max;
    auto n = ps.length;
    for (int i = 0; i < n; i++) {
        for (int j = i + 1; j < n; j++) {
            if (j - i + 1 < k)
                continue;

            int[] ys;
            for (int m = i; m <= j; m++)
                ys ~= ps[m][1];
            ys.sort;

            int[] us;
            for (int m = 0; m < ys.length; m++) {
                if (us.length >= k) {
                    us = us[1 .. $];
                }

                us ~= ys[m];

                if (us.length >= k) {
                    long x = cast(long) ps[j][0] - cast(long) ps[i][0];
                    long y = cast(long) us[$ - 1] - cast(long) us[0];
                    long area = x * y;
                    ans = min(ans, area);
                }
            }
        }
    }

    return ans;
}

void main() {
    auto nk = readints;
    int n = nk[0], k = nk[1];

    int[][] ps;
    for (int i = 0; i < n; i++) {
        auto p = readints;
        ps ~= p;
    }

    writeln(calc(k, ps));
}
