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