S = input()
S_even = S[1::2]
S_odd = S[0::2]

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

if 'L' not in S_odd and 'R' not in S_even:
    print('Yes')
else:
    print('No')
