#T578. 字符序列模式识别

字符序列模式识别

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 be between 0 and 1000 (exclusive), 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