INF = float("inf")



N, K, *XY = list(map(int, open(0).read().split()))



X, Y = list(zip(*sorted(zip(*[iter(XY)] * 2))))



ans = INF

for k in range(K, N + 1):

    for i in range(N - k + 1):

        dx = X[i + k - 1] - X[i]

        YY = sorted(Y[i:i + k])

        for j in range(k - K + 1):

            dy = YY[j + K - 1] - YY[j]

            ans = min(ans, dx * dy)



print(ans)
N, K, *XY = list(map(int, open(0).read().split()))



X, Y = list(zip(*sorted(zip(*[iter(XY)] * 2))))



cand = []

for k in range(K, N + 1):

    for i in range(N - k + 1):

        dx = X[i + k - 1] - X[i]

        YY = sorted(Y[i:i + k])

        cand += [dx * (YY[j + K - 1] - YY[j]) for j in range(k - K + 1)]



print((min(cand)))
INF = float("inf")
N, K, *XY = list(map(int, open(0).read().split()))
X, Y = list(zip(*sorted(zip(*[iter(XY)] * 2))))
ans = INF
for k in range(K, N + 1):
    for i in range(N - k + 1):
        dx = X[i + k - 1] - X[i]
        YY = sorted(Y[i : i + k])
        for j in range(k - K + 1):
            dy = YY[j + K - 1] - YY[j]
            ans = min(ans, dx * dy)
print(ans)

N, K, *XY = list(map(int, open(0).read().split()))
X, Y = list(zip(*sorted(zip(*[iter(XY)] * 2))))
cand = []
for k in range(K, N + 1):
    for i in range(N - k + 1):
        dx = X[i + k - 1] - X[i]
        YY = sorted(Y[i : i + k])
        cand += [dx * (YY[j + K - 1] - YY[j]) for j in range(k - K + 1)]
print((min(cand)))

-INF = float("inf") -ans = INF +cand = [] -        for j in range(k - K + 1): -            dy = YY[j + K - 1] - YY[j] -            ans = min(ans, dx * dy) -print(ans) +        cand += [dx * (YY[j + K - 1] - YY[j]) for j in range(k - K + 1)] +print((min(cand)))