# -*- coding: utf-8 -*-

from itertools import product, combinations

from operator import itemgetter

def inpl(): return tuple(map(int, input().split()))



N, K = inpl()

X = []

Y = []

Px = []

Py = []



for i in range(N):

    x, y = inpl()

    X.append(x)

    Y.append(y)

    Px.append((x, i))

    Py.append((y, i))



X = sorted(X)

Y = sorted(Y)



dX = {x:i for i, x in enumerate(X)}

dY = {y:i for i, y in enumerate(Y)}

Px = sorted(Px)

Py = sorted(Py)



get = itemgetter(1)

res = 5 * 10**18



for (l, r), (d, u) in product(combinations(X, 2), combinations(Y, 2)):

    if res < (r-l)*(u-d):

        continue

    if (dX[r] - dX[l] < K-1) or (dY[u] - dY[d] < K-1):

        continue



    sx = set(map(get, Px[dX[l]:dX[r]+1]))

    sy = set(map(get, Py[dY[d]:dY[u]+1]))

    if len(sx.intersection(sy)) >= K:

        res = min(res, (r-l)*(u-d))



print(res)
# -*- coding: utf-8 -*-

from itertools import product, combinations

from operator import itemgetter

def inpl(): return tuple(map(int, input().split()))



N, K = inpl()

X = []

Y = []

Px = []

Py = []



for i in range(N):

    x, y = inpl()

    X.append(x)

    Y.append(y)

    Px.append((x, i))

    Py.append((y, i))



X = sorted(X)

Y = sorted(Y)



dX = {x:i for i, x in enumerate(X)}

dY = {y:i for i, y in enumerate(Y)}

Px = sorted(Px)

Py = sorted(Py)



get = itemgetter(1)

res = 5 * 10**18



for (l, r), (d, u) in product(combinations(X, 2), combinations(Y, 2)):

    if (dX[r] - dX[l] < K-1) or (dY[u] - dY[d] < K-1):

        continue

    if res < (r-l)*(u-d):

        continue



    sx = set(map(get, Px[dX[l]:dX[r]+1]))

    sy = set(map(get, Py[dY[d]:dY[u]+1]))

    if len(sx.intersection(sy)) >= K:

        res = min(res, (r-l)*(u-d))



print(res)
# -*- coding: utf-8 -*-
from itertools import product, combinations
from operator import itemgetter


def inpl():
    return tuple(map(int, input().split()))


N, K = inpl()
X = []
Y = []
Px = []
Py = []
for i in range(N):
    x, y = inpl()
    X.append(x)
    Y.append(y)
    Px.append((x, i))
    Py.append((y, i))
X = sorted(X)
Y = sorted(Y)
dX = {x: i for i, x in enumerate(X)}
dY = {y: i for i, y in enumerate(Y)}
Px = sorted(Px)
Py = sorted(Py)
get = itemgetter(1)
res = 5 * 10**18
for (l, r), (d, u) in product(combinations(X, 2), combinations(Y, 2)):
    if res < (r - l) * (u - d):
        continue
    if (dX[r] - dX[l] < K - 1) or (dY[u] - dY[d] < K - 1):
        continue
    sx = set(map(get, Px[dX[l] : dX[r] + 1]))
    sy = set(map(get, Py[dY[d] : dY[u] + 1]))
    if len(sx.intersection(sy)) >= K:
        res = min(res, (r - l) * (u - d))
print(res)

# -*- coding: utf-8 -*-
from itertools import product, combinations
from operator import itemgetter


def inpl():
    return tuple(map(int, input().split()))


N, K = inpl()
X = []
Y = []
Px = []
Py = []
for i in range(N):
    x, y = inpl()
    X.append(x)
    Y.append(y)
    Px.append((x, i))
    Py.append((y, i))
X = sorted(X)
Y = sorted(Y)
dX = {x: i for i, x in enumerate(X)}
dY = {y: i for i, y in enumerate(Y)}
Px = sorted(Px)
Py = sorted(Py)
get = itemgetter(1)
res = 5 * 10**18
for (l, r), (d, u) in product(combinations(X, 2), combinations(Y, 2)):
    if (dX[r] - dX[l] < K - 1) or (dY[u] - dY[d] < K - 1):
        continue
    if res < (r - l) * (u - d):
        continue
    sx = set(map(get, Px[dX[l] : dX[r] + 1]))
    sy = set(map(get, Py[dY[d] : dY[u] + 1]))
    if len(sx.intersection(sy)) >= K:
        res = min(res, (r - l) * (u - d))
print(res)

+    if (dX[r] - dX[l] < K - 1) or (dY[u] - dY[d] < K - 1): +        continue -        continue -    if (dX[r] - dX[l] < K - 1) or (dY[u] - dY[d] < K - 1):