#SDNU1724. Commencement

Commencement

Problem Statement

A string SS consisting of lowercase English letters is a good string if and only if it satisfies the following property for all integers ii not less than 1:

  • There are exactly zero or exactly two different letters that appear exactly ii times in SS.

Given a string SS, determine if it is a good string.

Constraints

  • SS is a string of lowercase English letters with a length between 11 and 100100, inclusive.

Input

The input is given from Standard Input in the following format:

S

Output

Print Yes if SS is a good string, and No otherwise.

commencement
Yes

For the string commencement, the number of different letters that appear exactly iitimes is as follows:

  • i=1: two letters (o and t)
  • i=2: two letters (c and n)
  • i=3: two letters (e and m)
  • i≥4: zero letters

Therefore, commencement satisfies the condition of a good string.

banana
No

For the string banana, there is only one letter that appears exactly one time, which is b, so it does not satisfy the condition of a good string.

ab
Yes