P25388 [AtCoder] Beautiful Harmony
普及+
题目描述

Problem Description

A string $ S $ consisting of lowercase English letters is considered "beautiful" if, for every alphabet that appears at least once in $ S $, the number of occurrences is the same. For example, abba, ddddd, and xyz are beautiful, but aab and xyxyxyz are not.

Given a string $ S $, determine whether it is beautiful or not.

Input Format

The input is given from the standard input in the following format:

$ S $

Output Format

Output Yes if $ S $ is beautiful, otherwise output No in one line.

Sample Input and Output

Sample Input #1

ababcc

Sample Output #1

Yes

Sample Input #2

reiwa

Sample Output #2

Yes

Sample Input #3

cpsco

Sample Output #3

No

Notes/Hints

Constraints

  • The length of $ S $ is between $ 1 $ and $ 10^5 $ inclusive.
  • $ S $ consists only of lowercase English letters.

Sample Explanation 1

a, b, and c each appear twice, and all occurrences are equal, so it is beautiful.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
ababcc
样例输出
Yes