s=input()
n=len(s)
o=[]
e=[]
for i in range(n):
    if (i+1)%2==0:
        e.append(s[i])
    else:
        o.append(s[i])
if o.count('L')==0 and e.count('R')==0:
    print('Yes')
else:
    print('No') s=input() s input() input n=len(s) n len(s) len s o=[] o [] e=[] e [] for i in range(n):
    if (i+1)%2==0:
        e.append(s[i])
    else:
        o.append(s[i]) i range(n) range n if (i+1)%2==0:
        e.append(s[i])
    else:
        o.append(s[i]) (i+1)%2==0 (i+1)%2 i+1 i 1 2 0 e.append(s[i]) e.append e append s[i] s i o.append(s[i]) o.append o append s[i] s i if o.count('L')==0 and e.count('R')==0:
    print('Yes')
else:
    print('No') o.count('L')==0 and e.count('R')==0 o.count('L')==0 o.count('L') o.count o count 'L' 0 e.count('R')==0 e.count('R') e.count e count 'R' 0 print('Yes') print 'Yes' print('No') print 'No' s=input() input() s o=[] [] o n=len(s) len(s) n e=[] [] e
s=input()
n=len(s)
o=[]
e=[]
for i in range(n):
    if (i+1)%2==0:
        e.append(s[i])
    else:
        o.append(s[i])
if o.count('L')==0 and e.count('R')==0:
    print('Yes')
else:
    print('No')