{"problem":{"name":"Commencement","description":{"content":"A string $S$ consisting of lowercase English letters is a **good string** if and only if it satisfies the following property for all integers $i$ not less than $1$: *   There are exactly zero or exac","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc349_b"},"statements":[{"statement_type":"Markdown","content":"A string $S$ consisting of lowercase English letters is a **good string** if and only if it satisfies the following property for all integers $i$ not less than $1$:\n\n*   There are exactly zero or exactly two different letters that appear exactly $i$ times in $S$.\n\nGiven a string $S$, determine if it is a good string.\n\n## Constraints\n\n*   $S$ is a string of lowercase English letters with a length between $1$ and $100$, inclusive.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$S$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc349_b","tags":[],"sample_group":[["commencement","Yes\n\nFor the string `commencement`, the number of different letters that appear exactly $i$ times is as follows:\n\n*   $i=1$: two letters (`o` and `t`)\n*   $i=2$: two letters (`c` and `n`)\n*   $i=3$: two letters (`e` and `m`)\n*   $i\\geq 4$: zero letters\n\nTherefore, `commencement` satisfies the condition of a good string."],["banana","No\n\nFor 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"]],"created_at":"2026-03-03 11:01:14"}}