s = input()
playable = True
for i, c in enumerate(s):
    if i % 2 == 1 and c == 'R' or i % 2 == 0 and c == 'L':
        playable = False
        break
print("Yes" if playable else "No") s = input() s input() input playable = True playable True for i, c in enumerate(s):
    if i % 2 == 1 and c == 'R' or i % 2 == 0 and c == 'L':
        playable = False
        break i c enumerate(s) enumerate s if i % 2 == 1 and c == 'R' or i % 2 == 0 and c == 'L':
        playable = False
        break i % 2 == 1 and c == 'R' or i % 2 == 0 and c == 'L' i % 2 == 1 and c == 'R' i % 2 == 1 i % 2 i 2 1 c == 'R' c 'R' i % 2 == 0 and c == 'L' i % 2 == 0 i % 2 i 2 0 c == 'L' c 'L' playable = False playable False break print("Yes" if playable else "No") print "Yes" if playable else "No" playable "Yes" "No" s = input() input() s playable = False False playable playable = True True playable
s = input()
playable = True
for i, c in enumerate(s):
    if i % 2 == 1 and c == 'R' or i % 2 == 0 and c == 'L':
        playable = False
        break
print("Yes" if playable else "No")