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