#!/usr/bin/env python3

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

S = input()

odd = ('R', 'U', 'D')
even = ('L', 'U', 'D')

for i, s in enumerate(S):
    if not i % 2 and s not in odd:
        print('No')
        sys.exit()
    if i % 2 and s not in even:
        print('No')
        sys.exit()

print('Yes')
 import sys sys read = sys.stdin.buffer.read read sys.stdin.buffer.read sys.stdin.buffer sys.stdin sys stdin buffer read readline = sys.stdin.buffer.readline readline sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline readlines = sys.stdin.buffer.readlines readlines sys.stdin.buffer.readlines sys.stdin.buffer sys.stdin sys stdin buffer readlines sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 S = input() S input() input odd = ('R', 'U', 'D') odd ('R', 'U', 'D') 'R' 'U' 'D' even = ('L', 'U', 'D') even ('L', 'U', 'D') 'L' 'U' 'D' for i, s in enumerate(S):
    if not i % 2 and s not in odd:
        print('No')
        sys.exit()
    if i % 2 and s not in even:
        print('No')
        sys.exit() i s enumerate(S) enumerate S if not i % 2 and s not in odd:
        print('No')
        sys.exit()
     not i % 2 and s not in odd not i % 2 i % 2 i 2 s not in odd s odd print('No') print 'No' sys.exit() sys.exit sys exit if i % 2 and s not in even:
        print('No')
        sys.exit() i % 2 and s not in even i % 2 i 2 s not in even s even print('No') print 'No' sys.exit() sys.exit sys exit print('Yes') print 'Yes' readlines = sys.stdin.buffer.readlines sys.stdin.buffer.readlines readlines readline = sys.stdin.buffer.readline sys.stdin.buffer.readline readline odd = ('R', 'U', 'D') ('R', 'U', 'D') odd S = input() input() S even = ('L', 'U', 'D') ('L', 'U', 'D') even read = sys.stdin.buffer.read sys.stdin.buffer.read read
#!/usr/bin/env python3

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

S = input()

odd = ('R', 'U', 'D')
even = ('L', 'U', 'D')

for i, s in enumerate(S):
    if not i % 2 and s not in odd:
        print('No')
        sys.exit()
    if i % 2 and s not in even:
        print('No')
        sys.exit()

print('Yes')

