let f a b c = (b>a && b>c && a<>c) || (bc) let g a b c = a=b || b=c || c=a let h a b c = seq { for i in 2..max a c -> if (f (a%i) (b%i) (c%i)) then 1 else 0 } |> Seq.sum let a = (stdin.ReadLine >> fun s -> s.Split ' ') () |> Array.map int match (f a.[0] a.[1] a.[2], g a.[0] a.[1] a.[2]) with | (true,_) -> "INF" | (_,true) -> "0" | (_,_) -> (h a.[0] a.[1] a.[2]).ToString () |> stdout.WriteLine