open System open System.Collections.Generic [] module hoge = let inline dump e = #if DEBUG printfn "%A" e; #endif e let read() = stdin.ReadLine() let reads() = read().Split() let readToEnd() = stdin.ReadToEnd() let lines(s:string) = s.Split([|stdout.NewLine|], StringSplitOptions.RemoveEmptyEntries) let (|ODD|EVE|) n = match n%2 with | 0 -> EVE | _ -> ODD let n,m = let t = reads() |> Array.map(int) in t.[0],t.[1] if n<=m then 1 else match n with | ODD -> -1 | EVE -> if n/2<=m then 2 else -1 |> printfn "%i"