open System let ri () = stdin.ReadLine() |> int let ria () = stdin.ReadLine().Split() |> Array.map int type Sol() = member this.Solve() = let [|N;M|] = ria() let [|X;Y|] = ria() let f m a = let x = a % (2*m) if x < m then (x+1) else ( 2*m - x ) //f M (X-1) |> printfn "%d" //f M (Y-1) |> printfn "%d" let jdg a b = (f M (a-1)) = (f M (b-1)) (if jdg X Y then "YES" else "NO" ) |> printfn "%s" () let mySol = new Sol() mySol.Solve()