S=list(input())
ki=[]
gu=[]
for i in range(len(S)):
    if i%2==0:
        ki.append(S[i])
    else:
        gu.append(S[i])
if ("L" not in ki) and ("R" not in gu):
    print("Yes")
else:
    print("No") S=list(input()) S list(input()) list input() input ki=[] ki [] gu=[] gu [] for i in range(len(S)):
    if i%2==0:
        ki.append(S[i])
    else:
        gu.append(S[i]) i range(len(S)) range len(S) len S if i%2==0:
        ki.append(S[i])
    else:
        gu.append(S[i]) i%2==0 i%2 i 2 0 ki.append(S[i]) ki.append ki append S[i] S i gu.append(S[i]) gu.append gu append S[i] S i if ("L" not in ki) and ("R" not in gu):
    print("Yes")
else:
    print("No") ("L" not in ki) and ("R" not in gu) "L" not in ki "L" ki "R" not in gu "R" gu print("Yes") print "Yes" print("No") print "No" ki=[] [] ki gu=[] [] gu S=list(input()) list(input()) S
S=list(input())
ki=[]
gu=[]
for i in range(len(S)):
    if i%2==0:
        ki.append(S[i])
    else:
        gu.append(S[i])
if ("L" not in ki) and ("R" not in gu):
    print("Yes")
else:
    print("No")