{"problem":{"name":"Palindrome-phobia","description":{"content":"Snuke has a string $S$ consisting of three kinds of letters: `a`, `b` and `c`. He has a phobia for palindromes, and wants to permute the characters in $S$ so that $S$ will not contain a palindrome of ","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"cf17_final_b"},"statements":[{"statement_type":"Markdown","content":"Snuke has a string $S$ consisting of three kinds of letters: `a`, `b` and `c`.\nHe has a phobia for palindromes, and wants to permute the characters in $S$ so that $S$ will not contain a palindrome of length $2$ or more as a substring. Determine whether this is possible.\n\n## Constraints\n\n*   $1 \\leq |S| \\leq 10^5$\n*   $S$ consists of `a`, `b` and `c`.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$S$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"cf17_final_b","tags":[],"sample_group":[["abac","YES\n\nAs it stands now, $S$ contains a palindrome `aba`, but we can permute the characters to get `acba`, for example, that does not contain a palindrome of length $2$ or more."],["aba","NO"],["babacccabab","YES"]],"created_at":"2026-03-03 11:01:14"}}