S = input()

for i in range(1, len(S)+1):
    if i % 2 == 0 and S[i-1] == 'R':
        print('No')
        break
    elif i % 2 != 0 and S[i-1] == 'L':
        print('No')
        break
else:
    print('Yes') S = input() S input() input for i in range(1, len(S)+1):
    if i % 2 == 0 and S[i-1] == 'R':
        print('No')
        break
    elif i % 2 != 0 and S[i-1] == 'L':
        print('No')
        break
else:
    print('Yes') i range(1, len(S)+1) range 1 len(S)+1 len(S) len S 1 if i % 2 == 0 and S[i-1] == 'R':
        print('No')
        break
    elif i % 2 != 0 and S[i-1] == 'L':
        print('No')
        break 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' break elif i % 2 != 0 and S[i-1] == 'L':
        print('No')
        break i % 2 != 0 and S[i-1] == 'L' i % 2 != 0 i % 2 i 2 0 S[i-1] == 'L' S[i-1] S i-1 i 1 'L' print('No') print 'No' break print('Yes') print 'Yes' S = input() input() S
S = input()

for i in range(1, len(S)+1):
    if i % 2 == 0 and S[i-1] == 'R':
        print('No')
        break
    elif i % 2 != 0 and S[i-1] == 'L':
        print('No')
        break
else:
    print('Yes')
