from itertools import product,combinations

N,K=list(map(int,input().split()))

L=[tuple(map(int,input().split())) for i in range(N)]

ans=10**37

def f(i,j,k,l):

    n=0

    s=min(L[j][0],L[i][0])

    t=max(L[j][0],L[i][0])

    u=min(L[k][1],L[l][1])

    w=max(L[k][1],L[l][1])

    for e in L:

        if s<=e[0]<=t and u<=e[1]<=w:

            n+=1

    if n>=K:

        return (t-s)*(w-u)

    return 10**37

for i,j in combinations(list(range(N)),2):

    for k,l in combinations(list(range(N)),2):

        #print(i,j,k,l)

        ans=min(ans,f(i,j,k,l))

print(ans)
N,K=list(map(int,input().split()))

L=[tuple(map(int,input().split())) for i in range(N)]

L.sort()

ans=10**37

for i in range(N):

    for j in range(i+1,N):

        t=L[j][0]-L[i][0]

        S=sorted(x[1] for x in L[i:j+1])

        for k in range(len(S)-K+1):

            u=S[K+k-1]-S[k]

            ans=min(ans,u*t)

print(ans)
from itertools import product, combinations

N, K = list(map(int, input().split()))
L = [tuple(map(int, input().split())) for i in range(N)]
ans = 10**37


def f(i, j, k, l):
    n = 0
    s = min(L[j][0], L[i][0])
    t = max(L[j][0], L[i][0])
    u = min(L[k][1], L[l][1])
    w = max(L[k][1], L[l][1])
    for e in L:
        if s <= e[0] <= t and u <= e[1] <= w:
            n += 1
    if n >= K:
        return (t - s) * (w - u)
    return 10**37


for i, j in combinations(list(range(N)), 2):
    for k, l in combinations(list(range(N)), 2):
        # print(i,j,k,l)
        ans = min(ans, f(i, j, k, l))
print(ans)

N, K = list(map(int, input().split()))
L = [tuple(map(int, input().split())) for i in range(N)]
L.sort()
ans = 10**37
for i in range(N):
    for j in range(i + 1, N):
        t = L[j][0] - L[i][0]
        S = sorted(x[1] for x in L[i : j + 1])
        for k in range(len(S) - K + 1):
            u = S[K + k - 1] - S[k]
            ans = min(ans, u * t)
print(ans)

-from itertools import product, combinations - +L.sort() - - -def f(i, j, k, l): -    n = 0 -    s = min(L[j][0], L[i][0]) -    t = max(L[j][0], L[i][0]) -    u = min(L[k][1], L[l][1]) -    w = max(L[k][1], L[l][1]) -    for e in L: -        if s <= e[0] <= t and u <= e[1] <= w: -            n += 1 -    if n >= K: -        return (t - s) * (w - u) -    return 10**37 - - -for i, j in combinations(list(range(N)), 2): -    for k, l in combinations(list(range(N)), 2): -        # print(i,j,k,l) -        ans = min(ans, f(i, j, k, l)) +for i in range(N): +    for j in range(i + 1, N): +        t = L[j][0] - L[i][0] +        S = sorted(x[1] for x in L[i : j + 1]) +        for k in range(len(S) - K + 1): +            u = S[K + k - 1] - S[k] +            ans = min(ans, u * t)