S = input()

if 'L' in S[::2] or 'R' in S[1::2]:
    print('No')
else:
    print('Yes') S = input() S input() input if 'L' in S[::2] or 'R' in S[1::2]:
    print('No')
else:
    print('Yes') 'L' in S[::2] or 'R' in S[1::2] 'L' in S[::2] 'L' S[::2] S ::2 2 'R' in S[1::2] 'R' S[1::2] S 1::2 1 2 print('No') print 'No' print('Yes') print 'Yes' S = input() input() S
S = input()

if 'L' in S[::2] or 'R' in S[1::2]:
    print('No')
else:
    print('Yes')