s=input()

ans="Yes"

#奇数
os=s[::2]
#print(os)
if "L" in os:
    ans="No"


#偶数
es=s[1::2]
#print(es)
if "R" in es:
    ans="No"
    
print(ans) s=input() s input() input ans="Yes" ans "Yes" os=s[::2] os s[::2] s ::2 2 if "L" in os:
    ans="No"


#偶数 "L" in os "L" os ans="No" ans "No" es=s[1::2] es s[1::2] s 1::2 1 2 if "R" in es:
    ans="No"
     "R" in es "R" es ans="No" ans "No" print(ans) print ans ans="Yes" "Yes" ans ans="No" "No" ans es=s[1::2] s[1::2] es s=input() input() s os=s[::2] s[::2] os ans="No" "No" ans
s=input()

ans="Yes"

#奇数
os=s[::2]
#print(os)
if "L" in os:
    ans="No"


#偶数
es=s[1::2]
#print(es)
if "R" in es:
    ans="No"
    
print(ans)