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