N,K = list(map(int,input().split()))

XY = [tuple(map(int,input().split())) for i in range(N)]

xs = []

ys = []

for x,y in XY:

    xs.append(x)

    ys.append(y)

xs.sort()

ys.sort()



def is_ok(l,r,d,u):

    k = 0

    for x,y in XY:

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

            k += 1

            if k >= K:

                return True

    return False



ans = float('inf')

for i in range(N-1):

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

        for k in range(N-1):

            for l in range(k+1,N):

                l,r,d,u = xs[i],xs[j],ys[k],ys[l]

                if (r-l)*(u-d) >= ans: continue

                if is_ok(l,r,d,u):

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

print(ans)
N,K = list(map(int,input().split()))

XY = [tuple(map(int,input().split())) for i in range(N)]

xs = []

ys = []

for x,y in XY:

    xs.append(x)

    ys.append(y)

xs.sort()

ys.sort()



ans = float('inf')

for l in range(N-1):

    for r in range(l+1,N):

        w = xs[r] - xs[l]

        for d in range(N-1):

            for u in range(d+1,N):

                h = ys[u] - ys[d]

                if w*h >= ans: continue

                cnt = 0

                for x,y in XY:

                    if xs[l] <= x <= xs[r] and ys[d] <= y <= ys[u]:

                        cnt += 1

                        if cnt==K: break

                if cnt==K:

                    ans = w*h

print(ans)
N, K = list(map(int, input().split()))
XY = [tuple(map(int, input().split())) for i in range(N)]
xs = []
ys = []
for x, y in XY:
    xs.append(x)
    ys.append(y)
xs.sort()
ys.sort()


def is_ok(l, r, d, u):
    k = 0
    for x, y in XY:
        if l <= x <= r and d <= y <= u:
            k += 1
            if k >= K:
                return True
    return False


ans = float("inf")
for i in range(N - 1):
    for j in range(i + 1, N):
        for k in range(N - 1):
            for l in range(k + 1, N):
                l, r, d, u = xs[i], xs[j], ys[k], ys[l]
                if (r - l) * (u - d) >= ans:
                    continue
                if is_ok(l, r, d, u):
                    ans = (r - l) * (u - d)
print(ans)

N, K = list(map(int, input().split()))
XY = [tuple(map(int, input().split())) for i in range(N)]
xs = []
ys = []
for x, y in XY:
    xs.append(x)
    ys.append(y)
xs.sort()
ys.sort()
ans = float("inf")
for l in range(N - 1):
    for r in range(l + 1, N):
        w = xs[r] - xs[l]
        for d in range(N - 1):
            for u in range(d + 1, N):
                h = ys[u] - ys[d]
                if w * h >= ans:
                    continue
                cnt = 0
                for x, y in XY:
                    if xs[l] <= x <= xs[r] and ys[d] <= y <= ys[u]:
                        cnt += 1
                        if cnt == K:
                            break
                if cnt == K:
                    ans = w * h
print(ans)

- - -def is_ok(l, r, d, u): -    k = 0 -    for x, y in XY: -        if l <= x <= r and d <= y <= u: -            k += 1 -            if k >= K: -                return True -    return False - - -for i in range(N - 1): -    for j in range(i + 1, N): -        for k in range(N - 1): -            for l in range(k + 1, N): -                l, r, d, u = xs[i], xs[j], ys[k], ys[l] -                if (r - l) * (u - d) >= ans: +for l in range(N - 1): +    for r in range(l + 1, N): +        w = xs[r] - xs[l] +        for d in range(N - 1): +            for u in range(d + 1, N): +                h = ys[u] - ys[d] +                if w * h >= ans: -                if is_ok(l, r, d, u): -                    ans = (r - l) * (u - d) +                cnt = 0 +                for x, y in XY: +                    if xs[l] <= x <= xs[r] and ys[d] <= y <= ys[u]: +                        cnt += 1 +                        if cnt == K: +                            break +                if cnt == K: +                    ans = w * h