let () = Scanf.scanf "%d %d\n" @@ fun n k ->
  let xys = Array.init n @@ fun _ ->
    Scanf.scanf "%d %d\n" @@ fun x y -> x, y in
  Array.sort (fun (v, w) (x, y) -> compare (v, ~- w) (x, ~- y)) xys;
  Printf.printf "%d\n" @@ Array.fold_left (Array.fold_left min) max_int @@
    Array.init (n - k + 1) @@ fun i ->
      Array.init (n - i - k + 1) @@ fun j ->
        let xys' = Array.init (j + k) (fun k -> snd xys.(i + k)) in
        Array.sort compare xys';
        (fst xys.(i + j + k - 1) - fst xys.(i)) * 
        Array.fold_left min max_int (Array.init (j + 1) (fun j -> xys'.(j + k - 1) - xys'.(j)))
