You are given a string S consisting of letters `b`, `d`, `p` and `q`. Determine whether S is a _mirror string_.  Here, a mirror string is a string S such that the following sequence of operations on S results in the same string S:    1. Reverse the order of the characters in S.    2. Replace each occurrence of `b` by `d`, `d` by `b`, `p` by `q`, and `q` by `p`, simultaneously.
s = list(input())
t = list(s[::-1])
for i in range(len(s)):
    if t[i] == 'b':
        t[i] = 'd'
    if t[i] == 'd':
        t[i] = 'b'
    if t[i] == 'p':
        t[i] = 'q'
    else:
        t[i] = 'p'
if s == t:
    print('Yes')
else:
    print('No')
s = list(input())
t = list(s[::-1])
for i in range(len(s)):
    if t[i] == 'b':
        t[i] = 'd'
    elif t[i] == 'd':
        t[i] = 'b'
    elif t[i] == 'p':
        t[i] = 'q'
    else:
        t[i] = 'p'
if s == t:
    print('Yes')
else:
    print('No')