s = input()

ans = 'Yes'
for i, si in enumerate(s):
    if ((i % 2 == 0) and (si == 'L')) or ((i % 2 == 1) and (si == 'R')):
        ans = 'No'
        break
print(ans) s = input() s input() input ans = 'Yes' ans 'Yes' for i, si in enumerate(s):
    if ((i % 2 == 0) and (si == 'L')) or ((i % 2 == 1) and (si == 'R')):
        ans = 'No'
        break i si enumerate(s) enumerate s if ((i % 2 == 0) and (si == 'L')) or ((i % 2 == 1) and (si == 'R')):
        ans = 'No'
        break ((i % 2 == 0) and (si == 'L')) or ((i % 2 == 1) and (si == 'R')) (i % 2 == 0) and (si == 'L') i % 2 == 0 i % 2 i 2 0 si == 'L' si 'L' (i % 2 == 1) and (si == 'R') i % 2 == 1 i % 2 i 2 1 si == 'R' si 'R' ans = 'No' ans 'No' break print(ans) print ans ans = 'No' 'No' ans ans = 'Yes' 'Yes' ans s = input() input() s
s = input()

ans = 'Yes'
for i, si in enumerate(s):
    if ((i % 2 == 0) and (si == 'L')) or ((i % 2 == 1) and (si == 'R')):
        ans = 'No'
        break
print(ans)
