S = input()
for i in range(1, len(S)+1):
    if (i % 2 == 1 and S[i-1] == "L") or (i % 2 == 0 and S[i-1] == "R"):
        print("No")
        exit()
print("Yes") S = input() S input() input for i in range(1, len(S)+1):
    if (i % 2 == 1 and S[i-1] == "L") or (i % 2 == 0 and S[i-1] == "R"):
        print("No")
        exit() i range(1, len(S)+1) range 1 len(S)+1 len(S) len S 1 if (i % 2 == 1 and S[i-1] == "L") or (i % 2 == 0 and S[i-1] == "R"):
        print("No")
        exit() (i % 2 == 1 and S[i-1] == "L") or (i % 2 == 0 and S[i-1] == "R") i % 2 == 1 and S[i-1] == "L" i % 2 == 1 i % 2 i 2 1 S[i-1] == "L" S[i-1] S i-1 i 1 "L" i % 2 == 0 and S[i-1] == "R" i % 2 == 0 i % 2 i 2 0 S[i-1] == "R" S[i-1] S i-1 i 1 "R" print("No") print "No" exit() exit print("Yes") print "Yes" S = input() input() S
S = input()
for i in range(1, len(S)+1):
    if (i % 2 == 1 and S[i-1] == "L") or (i % 2 == 0 and S[i-1] == "R"):
        print("No")
        exit()
print("Yes")
