import sys
s = input()
for i in range(len(s)):
    if i%2 == 0:
        if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
            continue
        else:
            print('No')
            sys.exit()
    else:
        if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
            continue
        else:
            print('No')
            sys.exit()
print('Yes') import sys sys s = input() s input() input for i in range(len(s)):
    if i%2 == 0:
        if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
            continue
        else:
            print('No')
            sys.exit()
    else:
        if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
            continue
        else:
            print('No')
            sys.exit() i range(len(s)) range len(s) len s if i%2 == 0:
        if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
            continue
        else:
            print('No')
            sys.exit()
    else:
        if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
            continue
        else:
            print('No')
            sys.exit() i%2 == 0 i%2 i 2 0 if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
            continue
        else:
            print('No')
            sys.exit()
     s[i] == 'R' or s[i] == 'U' or s[i] == 'D' s[i] == 'R' or s[i] == 'U' s[i] == 'R' s[i] s i 'R' s[i] == 'U' s[i] s i 'U' s[i] == 'D' s[i] s i 'D' continue print('No') print 'No' sys.exit() sys.exit sys exit if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
            continue
        else:
            print('No')
            sys.exit() s[i] == 'L' or s[i] == 'U' or s[i] == 'D' s[i] == 'L' or s[i] == 'U' s[i] == 'L' s[i] s i 'L' s[i] == 'U' s[i] s i 'U' s[i] == 'D' s[i] s i 'D' continue print('No') print 'No' sys.exit() sys.exit sys exit print('Yes') print 'Yes' s = input() input() s
import sys
s = input()
for i in range(len(s)):
    if i%2 == 0:
        if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
            continue
        else:
            print('No')
            sys.exit()
    else:
        if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
            continue
        else:
            print('No')
            sys.exit()
print('Yes')