#T781. 字符序列模式识别
字符序列模式识别
Description
Try to write an algorithm that determines whether a character sequence follows the pattern 'subsequence1&subsequence2', where subsequence2 is the reverse of subsequence1. The length of each subsequence string must satisfy 0 < length < 1000, and all characters must be lowercase letters. Output YES or NO.
Input Format
A single line of character sequence.
Output Format
YES or NO
```input1 hello&ollhe ``` ```output1 NO ``` ## 来源CodesOnline