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