s = input()
n = len(s)

ans = 'Yes'

for i in range(n):
    if i%2 == 0 and s[i] == 'L': ans = 'No'
    if i%2 != 0 and s[i] == 'R': ans = 'No'

print(ans) s = input() s input() input n = len(s) n len(s) len s ans = 'Yes' ans 'Yes' for i in range(n):
    if i%2 == 0 and s[i] == 'L': ans = 'No'
    if i%2 != 0 and s[i] == 'R': ans = 'No' i range(n) range n if i%2 == 0 and s[i] == 'L': ans = 'No'
     i%2 == 0 and s[i] == 'L' i%2 == 0 i%2 i 2 0 s[i] == 'L' s[i] s i 'L' if i%2 != 0 and s[i] == 'R': ans =  i%2 != 0 and s[i] == 'R' i%2 != 0 i%2 i 2 0 s[i] == 'R' s[i] s i 'R' print(ans) print ans n = len(s) len(s) n s = input() input() s ans = 'Yes' 'Yes' ans
s = input()
n = len(s)

ans = 'Yes'

for i in range(n):
    if i%2 == 0 and s[i] == 'L': ans = 'No'
    if i%2 != 0 and s[i] == 'R': ans = 'No'

print(ans)