S = input()

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

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