Problem Description: Non-Palindromic String Permutation
Snuke has a string ( S ) consisting of three types of letters: a, b, and c. He has a phobia of palindromes and wants to permute the characters in ( S ) in such a way that the resulting string does not contain any palindromic substrings of length 2 or more.
Task
Determine if it is possible to permute the characters in ( S ) so that the resulting string contains no palindromic substrings of length 2 or greater.
Input Format
A single string ( S ) consisting of characters a, b, and c. The length of ( S ) will be at least 1 and at most ( 100 ).
Output Format
Print "Yes" if it is possible to permute the string as per the conditions mentioned, otherwise print "No".
Example
Input 1
text
abc
Output 1
text
Yes
Input 2
text
aabb
Output 2
text
No
Input 3
text
aaabbbccc
Output 3
text
Yes
Input 4
text
abba
Output 4
text
No
Notes
A palindrome is a string that reads the same backward as forward.
All strings of length 1 do not contain palindromic substrings of length 2 or greater.
Solution Location
The solution to the problem should be placed in the /app/ directory.
Important: place your implementation at /app/solution.py so the verifier can run it.