def main():

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

    xy = [list(map(int,input().split())) for _ in range(n)]



    ans = 10 ** 20



    for i in range(n):

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

            for ii in range(n):

                for jj in range(ii+1, n):

                    l = min(xy[i][0], xy[j][0])

                    r = max(xy[i][0], xy[j][0])

                    d = min(xy[ii][1], xy[jj][1])

                    u = max(xy[ii][1], xy[jj][1])

                    cnt = 0

                    for x,y in xy:

                        if l <= x <= r and d <= y <= u:

                            cnt += 1

                    if cnt >= k:

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



    print(ans)



if __name__ == '__main__':

    main()

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

xy = [list(map(int,input().split())) for _ in range(n)]



xy.sort()

ans = 10**20



for i in range(n):

    for j in range(i,n):

        xy_tmp = xy[i:j+1]

        if len(xy_tmp) >= k:

            l1 = xy_tmp[0][0]

            r1 = xy_tmp[-1][0]

            xy_tmp.sort(key = lambda x: x[1])

            for jj in range(len(xy_tmp) - k + 1):

                ans = min(ans, (r1-l1) * (xy_tmp[k+jj-1][1] - xy_tmp[jj][1]))



print(ans)

def main():
    n, k = list(map(int, input().split()))
    xy = [list(map(int, input().split())) for _ in range(n)]
    ans = 10**20
    for i in range(n):
        for j in range(i + 1, n):
            for ii in range(n):
                for jj in range(ii + 1, n):
                    l = min(xy[i][0], xy[j][0])
                    r = max(xy[i][0], xy[j][0])
                    d = min(xy[ii][1], xy[jj][1])
                    u = max(xy[ii][1], xy[jj][1])
                    cnt = 0
                    for x, y in xy:
                        if l <= x <= r and d <= y <= u:
                            cnt += 1
                    if cnt >= k:
                        ans = min(ans, (r - l) * (u - d))
    print(ans)


if __name__ == "__main__":
    main()

n, k = list(map(int, input().split()))
xy = [list(map(int, input().split())) for _ in range(n)]
xy.sort()
ans = 10**20
for i in range(n):
    for j in range(i, n):
        xy_tmp = xy[i : j + 1]
        if len(xy_tmp) >= k:
            l1 = xy_tmp[0][0]
            r1 = xy_tmp[-1][0]
            xy_tmp.sort(key=lambda x: x[1])
            for jj in range(len(xy_tmp) - k + 1):
                ans = min(ans, (r1 - l1) * (xy_tmp[k + jj - 1][1] - xy_tmp[jj][1]))
print(ans)

-def main(): -    n, k = list(map(int, input().split())) -    xy = [list(map(int, input().split())) for _ in range(n)] -    ans = 10**20 -    for i in range(n): -        for j in range(i + 1, n): -            for ii in range(n): -                for jj in range(ii + 1, n): -                    l = min(xy[i][0], xy[j][0]) -                    r = max(xy[i][0], xy[j][0]) -                    d = min(xy[ii][1], xy[jj][1]) -                    u = max(xy[ii][1], xy[jj][1]) -                    cnt = 0 -                    for x, y in xy: -                        if l <= x <= r and d <= y <= u: -                            cnt += 1 -                    if cnt >= k: -                        ans = min(ans, (r - l) * (u - d)) -    print(ans) - - -if __name__ == "__main__": -    main() +n, k = list(map(int, input().split())) +xy = [list(map(int, input().split())) for _ in range(n)] +xy.sort() +ans = 10**20 +for i in range(n): +    for j in range(i, n): +        xy_tmp = xy[i : j + 1] +        if len(xy_tmp) >= k: +            l1 = xy_tmp[0][0] +            r1 = xy_tmp[-1][0] +            xy_tmp.sort(key=lambda x: x[1]) +            for jj in range(len(xy_tmp) - k + 1): +                ans = min(ans, (r1 - l1) * (xy_tmp[k + jj - 1][1] - xy_tmp[jj][1])) +print(ans)