The Lair of Computer Shamans
In the Lair of Computer Shamans, there are 9 tribes: "A0", "A", "A'", "B", "B'", "C.py", "C.++", "C'", and "D". During their initiation, novice shamans were assigned to various groups, with some being part of multiple groups. When the Chief Shaman arrived to give a motivational speech, the young shamans were mingled together, standing next to members from different tribes. Fortunately, each shaman had their group number marked on their forehead, so the Chief Shaman only needed to determine from the group names whether both shamans belonged to the same tribe.
Input
The input consists of a single line containing the names of the groups of two young shamans from the Shamans' Lair, separated by a space. Each group name is composed of two characters: a letter and a digit.
Output
Print "YES" if the two shamans belong to the same tribe, and "NO" otherwise.