def solve():

    res = float('inf')

    for i in range(n):

        r_top = coordinates[i][1]

        for j in range(n):

            r_bottom = coordinates[j][1]

            if r_bottom < r_top:

                continue

            for k in range(n):

                c_left = coordinates[k][0]

                for l in range(n):

                    c_right = coordinates[l][0]

                    if c_right < c_left:

                        continue

                    cnt = 0

                    for c, r in coordinates:

                        # print(r_top, r, r_bottom, c_left, c, c_right)

                        if (r_top <= r <= r_bottom) and (c_left <= c <= c_right):

                            cnt += 1

                            if cnt >= need:

                                res = min(res, (r_bottom - r_top) * (c_right - c_left))

                                break



    return res





n, need = list(map(int, input().split()))

coordinates = tuple(sorted(tuple(map(int, input().split())) for _ in range(n)))

# x,y昇順



# print(coordinates)



print((solve()))

# 二次元累積和

# 写経

# https://ikatakos.com/pot/programming_algorithm/contest_history/atcoder/2017/1014_abc075



from collections import namedtuple

from operator import attrgetter



Coordinates = namedtuple('Coordinates', ('ind', 'x', 'y'))



n, k = list(map(int, input().split()))



e = []

for ind in range(n):

    x, y = list(map(int, input().split()))

    e.append(Coordinates(ind=ind, x=x, y=y))

x_asc = sorted(e, key=attrgetter('x'))  # x昇順

y_asc = sorted(e, key=attrgetter('y'))  # y昇順



# print(x_asc)

# print(y_asc)



tbl = [[0] * (n + 1) for _ in range(n + 1)]

for yi, py in enumerate(y_asc, 1):

    for xi, px in enumerate(x_asc, 1):

        tbl[xi][yi] = tbl[xi - 1][yi] + tbl[xi][yi - 1] - tbl[xi - 1][yi - 1] + (1 if py == px else 0)



ans = float('inf')



for left in range(1, n - (k - 1) + 1):

    for top in range(1, n - (k - 1) + 1):

        for right in range(left + k - 1, n + 1):

            for bottom in range(top + k - 1, n + 1):

                if tbl[right][bottom] - tbl[left - 1][bottom] - tbl[right][top - 1] + tbl[left - 1][top - 1] >= k:

                    ans = min(ans, (y_asc[bottom - 1].y - y_asc[top - 1].y) * (x_asc[right - 1].x - x_asc[left - 1].x))

print(ans)

def solve():
    res = float("inf")
    for i in range(n):
        r_top = coordinates[i][1]
        for j in range(n):
            r_bottom = coordinates[j][1]
            if r_bottom < r_top:
                continue
            for k in range(n):
                c_left = coordinates[k][0]
                for l in range(n):
                    c_right = coordinates[l][0]
                    if c_right < c_left:
                        continue
                    cnt = 0
                    for c, r in coordinates:
                        # print(r_top, r, r_bottom, c_left, c, c_right)
                        if (r_top <= r <= r_bottom) and (c_left <= c <= c_right):
                            cnt += 1
                            if cnt >= need:
                                res = min(res, (r_bottom - r_top) * (c_right - c_left))
                                break
    return res


n, need = list(map(int, input().split()))
coordinates = tuple(sorted(tuple(map(int, input().split())) for _ in range(n)))
# x,y昇順
# print(coordinates)
print((solve()))

# 二次元累積和
# 写経
# https://ikatakos.com/pot/programming_algorithm/contest_history/atcoder/2017/1014_abc075
from collections import namedtuple
from operator import attrgetter

Coordinates = namedtuple("Coordinates", ("ind", "x", "y"))
n, k = list(map(int, input().split()))
e = []
for ind in range(n):
    x, y = list(map(int, input().split()))
    e.append(Coordinates(ind=ind, x=x, y=y))
x_asc = sorted(e, key=attrgetter("x"))  # x昇順
y_asc = sorted(e, key=attrgetter("y"))  # y昇順
# print(x_asc)
# print(y_asc)
tbl = [[0] * (n + 1) for _ in range(n + 1)]
for yi, py in enumerate(y_asc, 1):
    for xi, px in enumerate(x_asc, 1):
        tbl[xi][yi] = (
            tbl[xi - 1][yi]
            + tbl[xi][yi - 1]
            - tbl[xi - 1][yi - 1]
            + (1 if py == px else 0)
        )
ans = float("inf")
for left in range(1, n - (k - 1) + 1):
    for top in range(1, n - (k - 1) + 1):
        for right in range(left + k - 1, n + 1):
            for bottom in range(top + k - 1, n + 1):
                if (
                    tbl[right][bottom]
                    - tbl[left - 1][bottom]
                    - tbl[right][top - 1]
                    + tbl[left - 1][top - 1]
                    >= k
                ):
                    ans = min(
                        ans,
                        (y_asc[bottom - 1].y - y_asc[top - 1].y)
                        * (x_asc[right - 1].x - x_asc[left - 1].x),
                    )
print(ans)

-def solve(): -    res = float("inf") -    for i in range(n): -        r_top = coordinates[i][1] -        for j in range(n): -            r_bottom = coordinates[j][1] -            if r_bottom < r_top: -                continue -            for k in range(n): -                c_left = coordinates[k][0] -                for l in range(n): -                    c_right = coordinates[l][0] -                    if c_right < c_left: -                        continue -                    cnt = 0 -                    for c, r in coordinates: -                        # print(r_top, r, r_bottom, c_left, c, c_right) -                        if (r_top <= r <= r_bottom) and (c_left <= c <= c_right): -                            cnt += 1 -                            if cnt >= need: -                                res = min(res, (r_bottom - r_top) * (c_right - c_left)) -                                break -    return res +# 二次元累積和 +# 写経 +# https://ikatakos.com/pot/programming_algorithm/contest_history/atcoder/2017/1014_abc075 +from collections import namedtuple +from operator import attrgetter - -n, need = list(map(int, input().split())) -coordinates = tuple(sorted(tuple(map(int, input().split())) for _ in range(n))) -# x,y昇順 -# print(coordinates) -print((solve())) +Coordinates = namedtuple("Coordinates", ("ind", "x", "y")) +n, k = list(map(int, input().split())) +e = [] +for ind in range(n): +    x, y = list(map(int, input().split())) +    e.append(Coordinates(ind=ind, x=x, y=y)) +x_asc = sorted(e, key=attrgetter("x"))  # x昇順 +y_asc = sorted(e, key=attrgetter("y"))  # y昇順 +# print(x_asc) +# print(y_asc) +tbl = [[0] * (n + 1) for _ in range(n + 1)] +for yi, py in enumerate(y_asc, 1): +    for xi, px in enumerate(x_asc, 1): +        tbl[xi][yi] = ( +            tbl[xi - 1][yi] +            + tbl[xi][yi - 1] +            - tbl[xi - 1][yi - 1] +            + (1 if py == px else 0) +        ) +ans = float("inf") +for left in range(1, n - (k - 1) + 1): +    for top in range(1, n - (k - 1) + 1): +        for right in range(left + k - 1, n + 1): +            for bottom in range(top + k - 1, n + 1): +                if ( +                    tbl[right][bottom] +                    - tbl[left - 1][bottom] +                    - tbl[right][top - 1] +                    + tbl[left - 1][top - 1] +                    >= k +                ): +                    ans = min( +                        ans, +                        (y_asc[bottom - 1].y - y_asc[top - 1].y) +                        * (x_asc[right - 1].x - x_asc[left - 1].x), +                    ) +print(ans)