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