s = list(input())

odd = s[::2]
even = s[1::2]
ans = "Yes"

if "L" in odd or "R" in even:
    ans = "No"

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

odd = s[::2]
even = s[1::2]
ans = "Yes"

if "L" in odd or "R" in even:
    ans = "No"

print(ans)