S = input()
ng = False
for i, c in enumerate(S):
    if ((i + 1) % 2 == 0 and c == 'R') or ((i + 1) % 2 == 1 and c == 'L'):
        ng = True
        break
if ng:
    print('No')
else:
    print('Yes') S = input() S input() input ng = False ng False for i, c in enumerate(S):
    if ((i + 1) % 2 == 0 and c == 'R') or ((i + 1) % 2 == 1 and c == 'L'):
        ng = True
        break i c enumerate(S) enumerate S if ((i + 1) % 2 == 0 and c == 'R') or ((i + 1) % 2 == 1 and c == 'L'):
        ng = True
        break ((i + 1) % 2 == 0 and c == 'R') or ((i + 1) % 2 == 1 and c == 'L') (i + 1) % 2 == 0 and c == 'R' (i + 1) % 2 == 0 (i + 1) % 2 i + 1 i 1 2 0 c == 'R' c 'R' (i + 1) % 2 == 1 and c == 'L' (i + 1) % 2 == 1 (i + 1) % 2 i + 1 i 1 2 1 c == 'L' c 'L' ng = True ng True break if ng:
    print('No')
else:
    print('Yes') ng print('No') print 'No' print('Yes') print 'Yes' ng = False False ng ng = True True ng S = input() input() S
S = input()
ng = False
for i, c in enumerate(S):
    if ((i + 1) % 2 == 0 and c == 'R') or ((i + 1) % 2 == 1 and c == 'L'):
        ng = True
        break
if ng:
    print('No')
else:
    print('Yes')
