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

sx, sy = [], []

for i in range(n):

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

    sx.append((x, i))

    sy.append((y, i))

sx.sort()

sy.sort()

px = [[0] for _ in range(n)]

for cx, (x, i) in enumerate(sx):

    px[i] = cx



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

for cy, (y, i) in enumerate(sy):

    for cx in range(n):

        acm[cx][cy] = acm[cx - 1][cy] + acm[cx][cy - 1] - acm[cx - 1][cy - 1] + int(px[i] == cx)



ans = 5e18

for lcx in range(n - k + 1):

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

        for lcy in range(n - k + 1):

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

                # print(li, ui, lj, uj)

                # print(acm[ui][uj], acm[ui][lj - 1], acm[li - 1][uj], acm[li - 1][lj - 1])

                if acm[ucx][ucy] - acm[ucx][lcy - 1] - acm[lcx - 1][ucy] + acm[lcx - 1][lcy - 1] >= k:

                    ans = min(ans, (sx[ucx][0] - sx[lcx][0]) * (sy[ucy][0] - sy[lcy][0]))

print(ans)

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

sx, sy = [], []

for i in range(n):

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

    sx.append((x, i))

    sy.append((y, i))

sx.sort()

sy.sort()

px = [[0] for _ in range(n)]

for cx, (x, i) in enumerate(sx):

    px[i] = cx



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

for cy, (y, i) in enumerate(sy):

    for cx in range(n):

        acm[cx][cy] = acm[cx - 1][cy] + acm[cx][cy - 1] - acm[cx - 1][cy - 1] + int(px[i] == cx)



ans = 5e18

for lcx in range(n - k + 1):

    for lcy in range(n - k + 1):

        acm_l = acm[lcx - 1][lcy - 1]

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

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

                if acm[ucx][ucy] - acm[ucx][lcy - 1] - acm[lcx - 1][ucy] + acm_l >= k:

                    ans = min(ans, (sx[ucx][0] - sx[lcx][0]) * (sy[ucy][0] - sy[lcy][0]))

                    break

print(ans)

n, k = list(map(int, input().split()))
sx, sy = [], []
for i in range(n):
    x, y = list(map(int, input().split()))
    sx.append((x, i))
    sy.append((y, i))
sx.sort()
sy.sort()
px = [[0] for _ in range(n)]
for cx, (x, i) in enumerate(sx):
    px[i] = cx
acm = [[0] * (n + 1) for _ in range(n + 1)]
for cy, (y, i) in enumerate(sy):
    for cx in range(n):
        acm[cx][cy] = (
            acm[cx - 1][cy] + acm[cx][cy - 1] - acm[cx - 1][cy - 1] + int(px[i] == cx)
        )
ans = 5e18
for lcx in range(n - k + 1):
    for ucx in range(lcx + k - 1, n):
        for lcy in range(n - k + 1):
            for ucy in range(lcy + k - 1, n):
                # print(li, ui, lj, uj)
                # print(acm[ui][uj], acm[ui][lj - 1], acm[li - 1][uj], acm[li - 1][lj - 1])
                if (
                    acm[ucx][ucy]
                    - acm[ucx][lcy - 1]
                    - acm[lcx - 1][ucy]
                    + acm[lcx - 1][lcy - 1]
                    >= k
                ):
                    ans = min(
                        ans, (sx[ucx][0] - sx[lcx][0]) * (sy[ucy][0] - sy[lcy][0])
                    )
print(ans)

n, k = list(map(int, input().split()))
sx, sy = [], []
for i in range(n):
    x, y = list(map(int, input().split()))
    sx.append((x, i))
    sy.append((y, i))
sx.sort()
sy.sort()
px = [[0] for _ in range(n)]
for cx, (x, i) in enumerate(sx):
    px[i] = cx
acm = [[0] * (n + 1) for _ in range(n + 1)]
for cy, (y, i) in enumerate(sy):
    for cx in range(n):
        acm[cx][cy] = (
            acm[cx - 1][cy] + acm[cx][cy - 1] - acm[cx - 1][cy - 1] + int(px[i] == cx)
        )
ans = 5e18
for lcx in range(n - k + 1):
    for lcy in range(n - k + 1):
        acm_l = acm[lcx - 1][lcy - 1]
        for ucx in range(lcx + k - 1, n):
            for ucy in range(lcy + k - 1, n):
                if acm[ucx][ucy] - acm[ucx][lcy - 1] - acm[lcx - 1][ucy] + acm_l >= k:
                    ans = min(
                        ans, (sx[ucx][0] - sx[lcx][0]) * (sy[ucy][0] - sy[lcy][0])
                    )
                    break
print(ans)

-    for ucx in range(lcx + k - 1, n): -        for lcy in range(n - k + 1): +    for lcy in range(n - k + 1): +        acm_l = acm[lcx - 1][lcy - 1] +        for ucx in range(lcx + k - 1, n): -                # print(li, ui, lj, uj) -                # print(acm[ui][uj], acm[ui][lj - 1], acm[li - 1][uj], acm[li - 1][lj - 1]) -                if ( -                    acm[ucx][ucy] -                    - acm[ucx][lcy - 1] -                    - acm[lcx - 1][ucy] -                    + acm[lcx - 1][lcy - 1] -                    >= k -                ): +                if acm[ucx][ucy] - acm[ucx][lcy - 1] - acm[lcx - 1][ucy] + acm_l >= k: +                    break