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