S = input()

if S[0::2].count('L') == 0 and S[1::2].count('R') == 0:
    print('Yes')
else:
    print('No') S = input() S input() input if S[0::2].count('L') == 0 and S[1::2].count('R') == 0:
    print('Yes')
else:
    print('No') S[0::2].count('L') == 0 and S[1::2].count('R') == 0 S[0::2].count('L') == 0 S[0::2].count('L') [0::2].count [0::2] S 0::2 0 2 count 'L' 0 S[1::2].count('R') == 0 S[1::2].count('R') [1::2].count [1::2] S 1::2 1 2 count 'R' 0 print('Yes') print 'Yes' print('No') print 'No' S = input() input() S
S = input()

if S[0::2].count('L') == 0 and S[1::2].count('R') == 0:
    print('Yes')
else:
    print('No')
