let () = let a, b = Scanf.scanf "%d %d\n" (fun a b -> a, b) in if a < b then Printf.printf "%s\n%d\n" "YES" (b-a-1) else Printf.printf "%s\n%d\n" "NO" (a-b+1)