let [| n; s; t; k |] = stdin.ReadLine().Split() |> Array.map int let arr = stdin.ReadLine().Split() |> Array.map int let f (xs: int array) (idx: int) : int = let mutable result = 1e9 |> int for i in 0 .. xs.Length - 1 do if i <> idx then if result > xs.[i] then result <- xs.[i] result if arr.[s - 1] + arr.[t - 1] <= k then 1 else let m = f arr (s - 1) if m + arr.[t - 1] <= k then 2 else -1 |> printfn "%d"