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