P27403 [AtCoder] Mirror Text
普及+
题目描述

Problem Description

You are given a string \( S \) composed of the characters b, d, p, and q. Determine if \( S \) is a "mirror text".

A "mirror text" is a string \( S \) that, when subjected to the following operations, results in the original string:

  1. Reverse the order of \( S \).
  2. Replace b with d, d with b, p with q, and q with p.

Input Format

The input is given from the standard input in the following format:

\( S \)

Output Format

Output Yes if \( S \) is a "mirror text", otherwise output No.

Sample Input and Output

Sample Input #1

pdbq

Sample Output #1

Yes

Sample Input #2

ppqb

Sample Output #2

No

Notes/Hints

Constraints

  • \( 1 \leq |S| \leq 10^5 \)
  • \( S \) consists only of the characters b, d, p, and q.
输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
pdbq
样例输出
Yes