S = input()
A = 'Yes'
for i in range(len(S)):
    if i%2==0 and S[i] == 'L':
        A = 'No'
    elif i%2 == 1 and S[i] == 'R':
        A = 'No'
print(A) S = input() S input() input A = 'Yes' A 'Yes' for i in range(len(S)):
    if i%2==0 and S[i] == 'L':
        A = 'No'
    elif i%2 == 1 and S[i] == 'R':
        A = 'No' i range(len(S)) range len(S) len S if i%2==0 and S[i] == 'L':
        A = 'No'
    elif i%2 == 1 and S[i] == 'R':
        A = 'No' i%2==0 and S[i] == 'L' i%2==0 i%2 i 2 0 S[i] == 'L' S[i] S i 'L' A = 'No' A 'No' elif i%2 == 1 and S[i] == 'R':
        A = 'No' i%2 == 1 and S[i] == 'R' i%2 == 1 i%2 i 2 1 S[i] == 'R' S[i] S i 'R' A = 'No' A 'No' print(A) print A A = 'Yes' 'Yes' A A = 'No' 'No' A A = 'No' 'No' A S = input() input() S
S = input()
A = 'Yes'
for i in range(len(S)):
    if i%2==0 and S[i] == 'L':
        A = 'No'
    elif i%2 == 1 and S[i] == 'R':
        A = 'No'
print(A)