S = input()
for i, s in enumerate(S, 1):
    if i % 2 == 1:
        if s == 'L':
            print('No')
            break
    else:
        if s == 'R':
            print('No')
            break
else:
    print('Yes') S = input() S input() input for i, s in enumerate(S, 1):
    if i % 2 == 1:
        if s == 'L':
            print('No')
            break
    else:
        if s == 'R':
            print('No')
            break
else:
    print('Yes') i s enumerate(S, 1) enumerate S 1 if i % 2 == 1:
        if s == 'L':
            print('No')
            break
    else:
        if s == 'R':
            print('No')
            break i % 2 == 1 i % 2 i 2 1 if s == 'L':
            print('No')
            break
     s == 'L' s 'L' print('No') print 'No' break if s == 'R':
            print('No')
            break s == 'R' s 'R' print('No') print 'No' break print('Yes') print 'Yes' S = input() input() S
S = input()
for i, s in enumerate(S, 1):
    if i % 2 == 1:
        if s == 'L':
            print('No')
            break
    else:
        if s == 'R':
            print('No')
            break
else:
    print('Yes')
