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