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')
        quit()
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')
        quit() 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')
        quit() 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' quit() quit 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')
        quit()
print('Yes')