S = list(input())

ans = "Yes"
for i in range(len(S)):
    cnt = i +1
    if cnt % 2 != 0:
        if S[i] == "L":
            ans = "No"
            break
    else:
        if S[i] == "R":
            ans = "No"
            break
print(ans) S = list(input()) S list(input()) list input() input ans = "Yes" ans "Yes" for i in range(len(S)):
    cnt = i +1
    if cnt % 2 != 0:
        if S[i] == "L":
            ans = "No"
            break
    else:
        if S[i] == "R":
            ans = "No"
            break i range(len(S)) range len(S) len S cnt = i +1 cnt i +1 i 1 if cnt % 2 != 0:
        if S[i] == "L":
            ans = "No"
            break
    else:
        if S[i] == "R":
            ans = "No"
            break cnt % 2 != 0 cnt % 2 cnt 2 0 if S[i] == "L":
            ans = "No"
            break
     S[i] == "L" S[i] S i "L" ans = "No" ans "No" break if S[i] == "R":
            ans = "No"
            break S[i] == "R" S[i] S i "R" ans = "No" ans "No" break print(ans) print ans cnt = i +1 i +1 cnt ans = "No" "No" ans ans = "No" "No" ans ans = "Yes" "Yes" ans S = list(input()) list(input()) S
S = list(input())

ans = "Yes"
for i in range(len(S)):
    cnt = i +1
    if cnt % 2 != 0:
        if S[i] == "L":
            ans = "No"
            break
    else:
        if S[i] == "R":
            ans = "No"
            break
print(ans)