s=input()
t=0
for i in range(len(s)):
    if i%2==0:
        if s[i]=="L":
            t+=1
    else:
        if s[i]=="R":
            t+=1
if t==0:
    print("Yes")
else:
    print("No") s=input() s input() input t=0 t 0 for i in range(len(s)):
    if i%2==0:
        if s[i]=="L":
            t+=1
    else:
        if s[i]=="R":
            t+=1 i range(len(s)) range len(s) len s if i%2==0:
        if s[i]=="L":
            t+=1
    else:
        if s[i]=="R":
            t+=1 i%2==0 i%2 i 2 0 if s[i]=="L":
            t+=1
     s[i]=="L" s[i] s i "L" t+=1 t 1 if s[i]=="R":
            t+=1 s[i]=="R" s[i] s i "R" t+=1 t 1 if t==0:
    print("Yes")
else:
    print("No") t==0 t 0 print("Yes") print "Yes" print("No") print "No" t+=1 1 t t=0 0 t s=input() input() s t+=1 1 t
s=input()
t=0
for i in range(len(s)):
    if i%2==0:
        if s[i]=="L":
            t+=1
    else:
        if s[i]=="R":
            t+=1
if t==0:
    print("Yes")
else:
    print("No")