import heapq

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

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

x=[l[i][0] for i in range(n)]

x.sort()

y=[l[i][1] for i in range(n)]

y.sort()

ans=[]

for i1 in range(n):

  for i2 in range(i1+1,n):

    for i3 in range(n):

      for i4 in range(i3+1,n):

        ct=0

        for i5 in range(n):

          if x[i1]<=l[i5][0]<=x[i2] and y[i3]<=l[i5][1]<=y[i4]:ct+=1

        if ct>=k:

          ans.append(abs(x[i1]-x[i2])*abs(y[i3]-y[i4]))

heapq.heapify(ans)

print((heapq.heappop(ans)))
n,k=list(map(int,input().split()))

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

x=[l[i][0] for i in range(n)]

x.sort()

y=[l[i][1] for i in range(n)]

y.sort()

ans=[]

for i1 in range(n):

  for i2 in range(i1+1,n):

    for i3 in range(n):

      for i4 in range(i3+1,n):

        ct=0

        for i5 in range(n):

          if x[i1]<=l[i5][0]<=x[i2] and y[i3]<=l[i5][1]<=y[i4]:ct+=1

        if ct>=k:

          ans.append(abs(x[i1]-x[i2])*abs(y[i3]-y[i4]))

print((min(ans)))
import heapq

n, k = list(map(int, input().split()))
l = [list(map(int, input().split())) for i in range(n)]
x = [l[i][0] for i in range(n)]
x.sort()
y = [l[i][1] for i in range(n)]
y.sort()
ans = []
for i1 in range(n):
    for i2 in range(i1 + 1, n):
        for i3 in range(n):
            for i4 in range(i3 + 1, n):
                ct = 0
                for i5 in range(n):
                    if x[i1] <= l[i5][0] <= x[i2] and y[i3] <= l[i5][1] <= y[i4]:
                        ct += 1
                if ct >= k:
                    ans.append(abs(x[i1] - x[i2]) * abs(y[i3] - y[i4]))
heapq.heapify(ans)
print((heapq.heappop(ans)))

n, k = list(map(int, input().split()))
l = [list(map(int, input().split())) for i in range(n)]
x = [l[i][0] for i in range(n)]
x.sort()
y = [l[i][1] for i in range(n)]
y.sort()
ans = []
for i1 in range(n):
    for i2 in range(i1 + 1, n):
        for i3 in range(n):
            for i4 in range(i3 + 1, n):
                ct = 0
                for i5 in range(n):
                    if x[i1] <= l[i5][0] <= x[i2] and y[i3] <= l[i5][1] <= y[i4]:
                        ct += 1
                if ct >= k:
                    ans.append(abs(x[i1] - x[i2]) * abs(y[i3] - y[i4]))
print((min(ans)))

-import heapq - -heapq.heapify(ans) -print((heapq.heappop(ans))) +print((min(ans)))