S = input()
ans = "Yes"
for i in range(len(S)):
    if i%2 == 0 and S[i] == "L":
        ans = "No"
    elif i%2 == 1 and S[i] == "R":
        ans = "No"
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"
    elif i%2 == 1 and S[i] == "R":
        ans = "No" i range(len(S)) range len(S) len S if i%2 == 0 and S[i] == "L":
        ans = "No"
    elif i%2 == 1 and S[i] == "R":
        ans = "No" 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" elif i%2 == 1 and S[i] == "R":
        ans = "No" 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" print(ans) print ans ans = "Yes" "Yes" ans ans = "No" "No" ans S = input() input() S ans = "No" "No" ans
S = input()
ans = "Yes"
for i in range(len(S)):
    if i%2 == 0 and S[i] == "L":
        ans = "No"
    elif i%2 == 1 and S[i] == "R":
        ans = "No"
print(ans)