//NOIP 2002 矩形覆盖
#include<cmath>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define ll long long
#define M(a) memset(a,0,sizeof a)
#define fo(i,j,k) for(i=j;i<=k;i++)
using namespace std;
const int mxn=55;
int n,k,ans=1e8;
int x[mxn],y[mxn],mxx[10],mnx[10],mxy[10],mny[10],vis[10];
inline int calc()
{
int i,j,res=0;
fo(i,1,k)
{
if(!vis[i]) return 1e8;
res+=(mxx[i]-mnx[i])*(mxy[i]-mny[i]);
}
return res;
}
inline bool judge()
{
int i,j;
fo(i,1,k)
fo(j,i+1,k)
if(vis[i] && vis[j])
{
if(mnx[j]<=mxx[i] && mxx[i]<=mxx[j] && mny[j]<=mxy[i] && mxy[i]<=mxy[j]) return 0;
if(mnx[j]<=mxx[i] && mxx[i]<=mxx[j] && mny[j]<=mny[i] && mny[i]<=mxy[j]) return 0;
if(mnx[j]<=mnx[i] && mnx[i]<=mxx[j] && mny[j]<=mxy[i] && mxy[i]<=mxy[j]) return 0;
if(mnx[j]<=mnx[i] && mnx[i]<=mxx[j] && mny[j]<=mny[i] && mny[i]<=mxy[j]) return 0;
}
return 1;
}
inline void dfs(int num)
{
if(!judge()) return;
if(num>n)
{
ans=min(ans,calc());
return;
}
int i,j,tmp1,tmp2,tmp3,tmp4;
fo(i,1,k)
if(mnx[i]<=x[num] && x[num]<=mxx[i] && mny[i]<=y[num] && y[num]<=mxy[i])
{
vis[i]++;
dfs(num+1);
vis[i]--;
return;
}
fo(i,1,k)
{
tmp1=mxx[i],tmp2=mxy[i],tmp3=mnx[i],tmp4=mny[i];
mxx[i]=max(mxx[i],x[num]);
mxy[i]=max(mxy[i],y[num]);
mnx[i]=min(mnx[i],x[num]);
mny[i]=min(mny[i],y[num]);
vis[i]++;
dfs(num+1);
vis[i]--;
mxx[i]=tmp1,mxy[i]=tmp2,mnx[i]=tmp3,mny[i]=tmp4;
}
}
int main()
{
int i,j;
scanf("%d%d",&n,&k);
fo(i,1,n)
scanf("%d%d",&x[i],&y[i]);
memset(mnx,0x3f,sizeof mnx);
memset(mny,0x3f,sizeof mny);
dfs(1);
printf("%d\n",ans);
return 0;
}