let n, k = Scanf.scanf " %d %d" @@ fun a b -> a, b
let ans, xs, ys = Array.(ref max_int, make n 0, make n 0)
let xys = Array.init n @@ fun i -> Scanf.scanf " %d %d" @@ fun x y -> xs.(i) <- x; ys.(i) <- y; x, y
let _ = Array.(sort (-) xs; sort (-) ys);
  for i = 0 to n - 1 do let xi = xs.(i) in for j = i + 1 to n - 1 do let xj = xs.(j) in for l = 0 to n - 1 do let yi = ys.(l) in for m = l + 1 to n - 1 do let yj = ys.(m) in let c = ref 0 in if Array.iter (fun (x, y) -> if xi <= x && x <= xj && yi <= y && y <= yj then incr c) xys; !c >= k then ans := min !ans @@ (xj - xi) * (yj - yi) done done done done; Printf.printf "%d\n" !ans