#!/usr/bin/env python3
S = input()
n = [S.count('a'), S.count('b'), S.count('c')]

ans = False
if len(S) == 1:
    ans = True
elif len(S) == 2 and len([x for x in n if x != 0]) == 2:
    ans = True
else:
    n.sort()
    if n[0] != 0 and n[2] - n[0] <= 1:
        ans = True
print(('NO', 'YES')[ans])
