s = input()
x = 0


for i in range(1,len(s),2):
    if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
        x += 1

for i in range(0,len(s),2):
    if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
        x += 1


if x == len(s):
    print('Yes')
else:
    print('No') s = input() s input() input x = 0 x 0 for i in range(1,len(s),2):
    if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
        x += 1 i range(1,len(s),2) range 1 len(s) len s 2 if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
        x += 1 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' x += 1 x 1 for i in range(0,len(s),2):
    if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
        x += 1 i range(0,len(s),2) range 0 len(s) len s 2 if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
        x += 1 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' x += 1 x 1 if x == len(s):
    print('Yes')
else:
    print('No') x == len(s) x len(s) len s print('Yes') print 'Yes' print('No') print 'No' x = 0 0 x x += 1 1 x x += 1 1 x s = input() input() s
s = input()
x = 0


for i in range(1,len(s),2):
    if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
        x += 1

for i in range(0,len(s),2):
    if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
        x += 1


if x == len(s):
    print('Yes')
else:
    print('No')