import sys



sys.setrecursionlimit(10 ** 6)

int1 = lambda x: int(x) - 1

p2D = lambda x: print(*x, sep="\n")

def MI(): return map(int, sys.stdin.readline().split())

def LI(): return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number): return [LI() for _ in range(rows_number)]



def main():

    n, k = MI()

    xy = []

    xx = []

    yy = []

    for _ in range(n):

        x, y = MI()

        xy.append([x, y])

        xx.append(x)

        yy.append(y)

    xx.sort()

    yy.sort()

    #print(xx)

    #print(yy)

    xtoi = {x: i for i, x in enumerate(xx)}

    ytoj = {y: j for j, y in enumerate(yy)}

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

    for x, y in xy:

        i, j = xtoi[x], ytoj[y]

        cs2d[i + 1][j + 1] = 1

    #p2D(cs2d)

    for i in range(1, n + 1):

        for j in range(1, n + 1):

            cs2d[i][j] += cs2d[i][j - 1]

    for j in range(1, n + 1):

        for i in range(1, n + 1):

            cs2d[i][j] += cs2d[i-1][j]

    #p2D(cs2d)

    ans = 10 ** 20

    for ri in range(n):

        r = xx[ri]

        for li in range(ri):

            l = xx[li]

            for ti in range(n):

                t = yy[ti]

                for bi in range(ti):

                    b = yy[bi]

                    cnt = cs2d[ri+1][ti+1]-cs2d[ri+1][bi]-cs2d[li][ti+1]+cs2d[li][bi]

                    if cnt >= k:

                        s = (r - l) * (t - b)

                        if s < ans: ans = s

    print(ans)



main()

from collections import deque

import sys



sys.setrecursionlimit(10 ** 6)

int1 = lambda x: int(x) - 1

p2D = lambda x: print(*x, sep="\n")

def II(): return int(sys.stdin.readline())

def MI(): return map(int, sys.stdin.readline().split())

def LI(): return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number): return [LI() for _ in range(rows_number)]

def SI(): return sys.stdin.readline()[:-1]



def main():

    n,k=MI()

    xx=set()

    yy=set()

    xy=[]

    for _ in range(n):

        x,y=MI()

        xy.append((x,y))

        xx.add(x)

        yy.add(y)

    xy.sort()

    xx=list(sorted(xx))

    yy = list(sorted(yy))

    xn=len(xx)

    yn=len(yy)

    ans=10**20

    for t in range(yn):

        y2=yy[t]

        for b in range(t):

            y1=yy[b]

            r=-1

            s=0

            i=j=0

            for l,x1 in enumerate(xx):

                while i<n and xy[i][0]<x1:

                    if y1 <= xy[i][1] <= y2: s -= 1

                    i += 1

                while s<k and r+1<xn:

                    r+=1

                    x2=xx[r]

                    while j<n and xy[j][0]<=x2:

                        if y1<=xy[j][1]<=y2:s+=1

                        j+=1

                if s>=k:

                    cur=(x2-x1)*(y2-y1)

                    if cur<ans:ans=cur

    print(ans)



main()

import sys

sys.setrecursionlimit(10**6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")


def MI():
    return map(int, sys.stdin.readline().split())


def LI():
    return list(map(int, sys.stdin.readline().split()))


def LLI(rows_number):
    return [LI() for _ in range(rows_number)]


def main():
    n, k = MI()
    xy = []
    xx = []
    yy = []
    for _ in range(n):
        x, y = MI()
        xy.append([x, y])
        xx.append(x)
        yy.append(y)
    xx.sort()
    yy.sort()
    # print(xx)
    # print(yy)
    xtoi = {x: i for i, x in enumerate(xx)}
    ytoj = {y: j for j, y in enumerate(yy)}
    cs2d = [[0] * (n + 1) for _ in range(n + 1)]
    for x, y in xy:
        i, j = xtoi[x], ytoj[y]
        cs2d[i + 1][j + 1] = 1
    # p2D(cs2d)
    for i in range(1, n + 1):
        for j in range(1, n + 1):
            cs2d[i][j] += cs2d[i][j - 1]
    for j in range(1, n + 1):
        for i in range(1, n + 1):
            cs2d[i][j] += cs2d[i - 1][j]
    # p2D(cs2d)
    ans = 10**20
    for ri in range(n):
        r = xx[ri]
        for li in range(ri):
            l = xx[li]
            for ti in range(n):
                t = yy[ti]
                for bi in range(ti):
                    b = yy[bi]
                    cnt = (
                        cs2d[ri + 1][ti + 1]
                        - cs2d[ri + 1][bi]
                        - cs2d[li][ti + 1]
                        + cs2d[li][bi]
                    )
                    if cnt >= k:
                        s = (r - l) * (t - b)
                        if s < ans:
                            ans = s
    print(ans)


main()

from collections import deque
import sys

sys.setrecursionlimit(10**6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")


def II():
    return int(sys.stdin.readline())


def MI():
    return map(int, sys.stdin.readline().split())


def LI():
    return list(map(int, sys.stdin.readline().split()))


def LLI(rows_number):
    return [LI() for _ in range(rows_number)]


def SI():
    return sys.stdin.readline()[:-1]


def main():
    n, k = MI()
    xx = set()
    yy = set()
    xy = []
    for _ in range(n):
        x, y = MI()
        xy.append((x, y))
        xx.add(x)
        yy.add(y)
    xy.sort()
    xx = list(sorted(xx))
    yy = list(sorted(yy))
    xn = len(xx)
    yn = len(yy)
    ans = 10**20
    for t in range(yn):
        y2 = yy[t]
        for b in range(t):
            y1 = yy[b]
            r = -1
            s = 0
            i = j = 0
            for l, x1 in enumerate(xx):
                while i < n and xy[i][0] < x1:
                    if y1 <= xy[i][1] <= y2:
                        s -= 1
                    i += 1
                while s < k and r + 1 < xn:
                    r += 1
                    x2 = xx[r]
                    while j < n and xy[j][0] <= x2:
                        if y1 <= xy[j][1] <= y2:
                            s += 1
                        j += 1
                if s >= k:
                    cur = (x2 - x1) * (y2 - y1)
                    if cur < ans:
                        ans = cur
    print(ans)


main()

+from collections import deque + + +def II(): +    return int(sys.stdin.readline()) +def SI(): +    return sys.stdin.readline()[:-1] + + +    xx = set() +    yy = set() -    xx = [] -    yy = [] -        xy.append([x, y]) -        xx.append(x) -        yy.append(y) -    xx.sort() -    yy.sort() -    # print(xx) -    # print(yy) -    xtoi = {x: i for i, x in enumerate(xx)} -    ytoj = {y: j for j, y in enumerate(yy)} -    cs2d = [[0] * (n + 1) for _ in range(n + 1)] -    for x, y in xy: -        i, j = xtoi[x], ytoj[y] -        cs2d[i + 1][j + 1] = 1 -    # p2D(cs2d) -    for i in range(1, n + 1): -        for j in range(1, n + 1): -            cs2d[i][j] += cs2d[i][j - 1] -    for j in range(1, n + 1): -        for i in range(1, n + 1): -            cs2d[i][j] += cs2d[i - 1][j] -    # p2D(cs2d) +        xy.append((x, y)) +        xx.add(x) +        yy.add(y) +    xy.sort() +    xx = list(sorted(xx)) +    yy = list(sorted(yy)) +    xn = len(xx) +    yn = len(yy) -    for ri in range(n): -        r = xx[ri] -        for li in range(ri): -            l = xx[li] -            for ti in range(n): -                t = yy[ti] -                for bi in range(ti): -                    b = yy[bi] -                    cnt = ( -                        cs2d[ri + 1][ti + 1] -                        - cs2d[ri + 1][bi] -                        - cs2d[li][ti + 1] -                        + cs2d[li][bi] -                    ) -                    if cnt >= k: -                        s = (r - l) * (t - b) -                        if s < ans: -                            ans = s +    for t in range(yn): +        y2 = yy[t] +        for b in range(t): +            y1 = yy[b] +            r = -1 +            s = 0 +            i = j = 0 +            for l, x1 in enumerate(xx): +                while i < n and xy[i][0] < x1: +                    if y1 <= xy[i][1] <= y2: +                        s -= 1 +                    i += 1 +                while s < k and r + 1 < xn: +                    r += 1 +                    x2 = xx[r] +                    while j < n and xy[j][0] <= x2: +                        if y1 <= xy[j][1] <= y2: +                            s += 1 +                        j += 1 +                if s >= k: +                    cur = (x2 - x1) * (y2 - y1) +                    if cur < ans: +                        ans = cur