let s = read_line ()
let f x = let n = ref 0 in String.iter (fun c -> if c = x then incr n) s; !n
let a, b, c = f 'a', f 'b', f 'c'
let _ = print_endline @@ if max a (max b c) - min a (min b c) > 1 then "NO" else "YES"