s=input()
ans="Yes"
for i in range(len(s)):
    if (i+1)%2==1:
        if s[i]=="L":
            ans="No"
    else:
        if s[i]=="R":
            ans="No"
print(ans) s=input() s input() input ans="Yes" ans "Yes" for i in range(len(s)):
    if (i+1)%2==1:
        if s[i]=="L":
            ans="No"
    else:
        if s[i]=="R":
            ans="No" i range(len(s)) range len(s) len s if (i+1)%2==1:
        if s[i]=="L":
            ans="No"
    else:
        if s[i]=="R":
            ans="No" (i+1)%2==1 (i+1)%2 i+1 i 1 2 1 if s[i]=="L":
            ans="No"
     s[i]=="L" s[i] s i "L" ans="No" ans "No" if s[i]=="R":
            ans="No" s[i]=="R" s[i] s i "R" ans="No" ans "No" print(ans) print ans ans="No" "No" ans ans="No" "No" ans s=input() input() s ans="Yes" "Yes" ans
s=input()
ans="Yes"
for i in range(len(s)):
    if (i+1)%2==1:
        if s[i]=="L":
            ans="No"
    else:
        if s[i]=="R":
            ans="No"
print(ans)