import sys

sys.setrecursionlimit(2147483647)

INF=float("inf")

MOD=10**9+7

input=sys.stdin.readline

def resolve():

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

    X=[0]*n

    Y=[0]*n

    for i in range(n):

        X[i],Y[i]=list(map(int,input().split()))

    ans=INF

    for a in range(n):

        for b in range(n):

            for c in range(a+1,n):

                for d in range(b+1):

                    x0,x1=sorted([X[a],X[c]])

                    y0,y1=sorted([Y[b],Y[d]])

                    count=0

                    for i in range(n):

                        if x0<=X[i]<=x1 and y0<=Y[i]<=y1:

                            count+=1

                    if count>=k:

                        ans=min(ans,(x1-x0)*(y1-y0))

    print(ans)

resolve()
import sys

sys.setrecursionlimit(2147483647)

INF=float("inf")

MOD=10**9+7

input=sys.stdin.readline

def resolve():

    from itertools import product

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

    X=[0]*n

    Y=[0]*n

    XY=[0]*n

    for i in range(n):

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

        X[i]=x

        Y[i]=y

        XY[i]=(x,y)

    # 2-dim cumsum (pivot=(-inf,-inf))

    S=[[0]*n for _ in range(n)]

    X.sort(); Y.sort()

    for i,j in product(list(range(n)),repeat=2):

        for x,y in XY:

            if x<=X[i] and y<=Y[j]: S[i][j]+=1

    # calculate

    ans=INF

    for i0,j0 in product(list(range(n)),repeat=2):

        for i1,j1 in product(list(range(i0+1,n)),list(range(j0+1,n))):

            count=S[i1][j1]

            if i0>0: count-=S[i0-1][j1]

            if j0>0: count-=S[i1][j0-1]

            if i0>0 and j0>0: count+=S[i0-1][j0-1]

            if count>=k:

                ans=min(ans,(X[i1]-X[i0])*(Y[j1]-Y[j0]))

    print(ans)

resolve()
import sys

sys.setrecursionlimit(2147483647)
INF = float("inf")
MOD = 10**9 + 7
input = sys.stdin.readline


def resolve():
    n, k = list(map(int, input().split()))
    X = [0] * n
    Y = [0] * n
    for i in range(n):
        X[i], Y[i] = list(map(int, input().split()))
    ans = INF
    for a in range(n):
        for b in range(n):
            for c in range(a + 1, n):
                for d in range(b + 1):
                    x0, x1 = sorted([X[a], X[c]])
                    y0, y1 = sorted([Y[b], Y[d]])
                    count = 0
                    for i in range(n):
                        if x0 <= X[i] <= x1 and y0 <= Y[i] <= y1:
                            count += 1
                    if count >= k:
                        ans = min(ans, (x1 - x0) * (y1 - y0))
    print(ans)


resolve()

import sys

sys.setrecursionlimit(2147483647)
INF = float("inf")
MOD = 10**9 + 7
input = sys.stdin.readline


def resolve():
    from itertools import product

    n, k = list(map(int, input().split()))
    X = [0] * n
    Y = [0] * n
    XY = [0] * n
    for i in range(n):
        x, y = list(map(int, input().split()))
        X[i] = x
        Y[i] = y
        XY[i] = (x, y)
    # 2-dim cumsum (pivot=(-inf,-inf))
    S = [[0] * n for _ in range(n)]
    X.sort()
    Y.sort()
    for i, j in product(list(range(n)), repeat=2):
        for x, y in XY:
            if x <= X[i] and y <= Y[j]:
                S[i][j] += 1
    # calculate
    ans = INF
    for i0, j0 in product(list(range(n)), repeat=2):
        for i1, j1 in product(list(range(i0 + 1, n)), list(range(j0 + 1, n))):
            count = S[i1][j1]
            if i0 > 0:
                count -= S[i0 - 1][j1]
            if j0 > 0:
                count -= S[i1][j0 - 1]
            if i0 > 0 and j0 > 0:
                count += S[i0 - 1][j0 - 1]
            if count >= k:
                ans = min(ans, (X[i1] - X[i0]) * (Y[j1] - Y[j0]))
    print(ans)


resolve()

+    from itertools import product + +    XY = [0] * n -        X[i], Y[i] = list(map(int, input().split())) +        x, y = list(map(int, input().split())) +        X[i] = x +        Y[i] = y +        XY[i] = (x, y) +    # 2-dim cumsum (pivot=(-inf,-inf)) +    S = [[0] * n for _ in range(n)] +    X.sort() +    Y.sort() +    for i, j in product(list(range(n)), repeat=2): +        for x, y in XY: +            if x <= X[i] and y <= Y[j]: +                S[i][j] += 1 +    # calculate -    for a in range(n): -        for b in range(n): -            for c in range(a + 1, n): -                for d in range(b + 1): -                    x0, x1 = sorted([X[a], X[c]]) -                    y0, y1 = sorted([Y[b], Y[d]]) -                    count = 0 -                    for i in range(n): -                        if x0 <= X[i] <= x1 and y0 <= Y[i] <= y1: -                            count += 1 -                    if count >= k: -                        ans = min(ans, (x1 - x0) * (y1 - y0)) +    for i0, j0 in product(list(range(n)), repeat=2): +        for i1, j1 in product(list(range(i0 + 1, n)), list(range(j0 + 1, n))): +            count = S[i1][j1] +            if i0 > 0: +                count -= S[i0 - 1][j1] +            if j0 > 0: +                count -= S[i1][j0 - 1] +            if i0 > 0 and j0 > 0: +                count += S[i0 - 1][j0 - 1] +            if count >= k: +                ans = min(ans, (X[i1] - X[i0]) * (Y[j1] - Y[j0]))