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