#include<stdio.h>
int main(void){
  char *s="python3 -c\""
"I=lambda:list(map(int,input().split()))\n"
"n,k=I()\n"
"z=[I()for _ in[0]*n]\n"
"z.sort()\n"
"a=10**20\n"
"for i in range(n):\n"
" for j in range(i+k-1,n):l=sorted(t[1]for t in z[i:j+1]);a=min(a,*[(z[j][0]-z[i][0])*(v-u)for u,v in zip(l,l[k-1:])])\n"
"print(a)\n"
"\"";
  system(s);
  return 0;
}            