s = input()
n = len(s)
yes = True
for i in range(n):
    if i % 2 == 0:
        if s[i] == "L":
            yes = False
    elif s[i] == "R":
        yes = False
if yes:
    print("Yes")
else:
    print("No") s = input() s input() input n = len(s) n len(s) len s yes = True yes True for i in range(n):
    if i % 2 == 0:
        if s[i] == "L":
            yes = False
    elif s[i] == "R":
        yes = False i range(n) range n if i % 2 == 0:
        if s[i] == "L":
            yes = False
    elif s[i] == "R":
        yes = False i % 2 == 0 i % 2 i 2 0 if s[i] == "L":
            yes = False
     s[i] == "L" s[i] s i "L" yes = False yes False elif s[i] == "R":
        yes = False s[i] == "R" s[i] s i "R" yes = False yes False if yes:
    print("Yes")
else:
    print("No") yes print("Yes") print "Yes" print("No") print "No" yes = True True yes yes = False False yes s = input() input() s n = len(s) len(s) n yes = False False yes
s = input()
n = len(s)
yes = True
for i in range(n):
    if i % 2 == 0:
        if s[i] == "L":
            yes = False
    elif s[i] == "R":
        yes = False
if yes:
    print("Yes")
else:
    print("No")