S = input()
is_easy = True

for i in range(len(S)):
    if i & 1 == 1 and S[i] == 'R':
        is_easy = False
        break
    if i & 1 == 0 and S[i] == 'L':
        is_easy = False
        break

print(['No', 'Yes'][is_easy]) S = input() S input() input is_easy = True is_easy True for i in range(len(S)):
    if i & 1 == 1 and S[i] == 'R':
        is_easy = False
        break
    if i & 1 == 0 and S[i] == 'L':
        is_easy = False
        break i range(len(S)) range len(S) len S if i & 1 == 1 and S[i] == 'R':
        is_easy = False
        break
     i & 1 == 1 and S[i] == 'R' i & 1 == 1 i & 1 i 1 1 S[i] == 'R' S[i] S i 'R' is_easy = False is_easy False break if i & 1 == 0 and S[i] == 'L':
        is_easy = False
        break i & 1 == 0 and S[i] == 'L' i & 1 == 0 i & 1 i 1 0 S[i] == 'L' S[i] S i 'L' is_easy = False is_easy False break print(['No', 'Yes'][is_easy]) print ['No', 'Yes'][is_easy] ['No', 'Yes'] 'No' 'Yes' is_easy is_easy = True True is_easy is_easy = False False is_easy is_easy = False False is_easy S = input() input() S
S = input()
is_easy = True

for i in range(len(S)):
    if i & 1 == 1 and S[i] == 'R':
        is_easy = False
        break
    if i & 1 == 0 and S[i] == 'L':
        is_easy = False
        break

print(['No', 'Yes'][is_easy])