Scanf.scanf "%d" (fun n -> let factor k = let rec loop r i acc = if r = 1 then acc else if i * i > r then 1 lxor acc else if r mod i <> 0 then loop r (i + 1) acc else let rec loop2 r c = if r mod i = 0 then loop2 (r / i) (c + 1) else loop r (i + 1) (c lxor acc) in loop2 r 0 in loop k 2 0 in print_endline @@ if factor n = 0 then "Bob" else "Alice" )