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