#abc302c. [abc302_c]Almost Equal
[abc302_c]Almost Equal
Problem Statement
You are given strings , each of length , consisting of lowercase English letter. Here, are pairwise distinct.
Determine if one can rearrange these strings to obtain a new sequence of strings such that:
- for all integers such that , one can alter exactly one character of to another lowercase English letter to make it equal to .
Constraints
- is a string of length consisting of lowercase English letters.
- are pairwise distinct.
Input
The input is given from Standard Input in the following format:
Output
Print Yes
if one can obtain a conforming sequence; print No
otherwise.
Sample Input 1
Sample Output 1
One can rearrange them in this order: abcd
, abed
, bbed
, fbed
. This sequence satisfies the condition.
Sample Input 2
Sample Output 2
No matter how the strings are rearranged, the condition is never satisfied.