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