open System type Sol() = member this.Solve() = let (A1,A2,A3) = stdin.ReadLine().Split() |> Array.map int |> fun ss -> (ss.[0],ss.[1],ss.[2]) let isKadomatsu a b c = a <> b && b <> c && c <> a && ( (ac) || (a>b && b Seq.max let mutable sum = 0 for i in 1..max do sum <- sum + (if (isKadomatsu (A1%i) (A2%i) (A3%i)) then 1 else 0) let ans = if (isKadomatsu A1 A2 A3) then "INF" else (string sum) printfn "%s" ans let mySol = new Sol() mySol.Solve()