unittest
{
	assert( [ "4 4", "1 4", "3 3", "6 2", "8 1" ].parse.expand.solve == 21 );
	assert( [ "4 2", "0 0", "1 1", "2 2", "3 3" ].parse.expand.solve == 1 );
	assert( [ "4 3", "-1000000000 -1000000000", "1000000000 1000000000", "-999999999 999999999", "999999999 -999999999" ].parse.expand.solve == 3999999996000000001 );
}



import std.algorithm;
import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto nk = input.front.split.to!( long[] );
	auto xys = new long[ 2 ][ nk[ 0 ] ];
	foreach( ref xy; xys )
	{
		input.popFront;
		xy = input.front.split.to!( long[] );
	}
	return tuple( nk[ 1 ], xys );
}

auto solve( long k, long[ 2 ][] xys )
{
	auto xs = new long[ xys.length ];
	auto ys = new long[ xys.length ];
	foreach( ref x, ref y, xy; lockstep( xs, ys, xys ) )
	{
		x = xy[ 0 ];
		y = xy[ 1 ];
	}
	xs.sort();
	ys.sort();
	
	auto ans = long.max;
	foreach( xi, xa; xs )
	{
		foreach( xb; xs[ xi .. $ ] )
		{
			foreach( yi, ya; ys )
			{
				foreach( yb; ys[ yi .. $ ] )
				{
					auto c = 0L;
					foreach( xy; xys )
					{
						c += ( xa <= xy[ 0 ] && xy[ 0 ] <= xb && ya <= xy[ 1 ] && xy[ 1 ] <= yb );
						if( c == k )
						{
							ans = min( ans, ( xb - xa ) * ( yb - ya ) );
							break;
						}
					}
				}
			}
		}
	}
	return ans;
}
