a=input()
ok=True
for i in range(len(a)):
    if (i+1)%2==0 and a[i]=="R":
        ok=False
        break
    if (i+1)%2==1 and a[i]=="L":
        ok=False
        break
 
if ok:
    print("Yes")
else:
    print("No") a=input() a input() input ok=True ok True for i in range(len(a)):
    if (i+1)%2==0 and a[i]=="R":
        ok=False
        break
    if (i+1)%2==1 and a[i]=="L":
        ok=False
        break
  i range(len(a)) range len(a) len a if (i+1)%2==0 and a[i]=="R":
        ok=False
        break
     (i+1)%2==0 and a[i]=="R" (i+1)%2==0 (i+1)%2 i+1 i 1 2 0 a[i]=="R" a[i] a i "R" ok=False ok False break if (i+1)%2==1 and a[i]=="L":
        ok=False
        break
  (i+1)%2==1 and a[i]=="L" (i+1)%2==1 (i+1)%2 i+1 i 1 2 1 a[i]=="L" a[i] a i "L" ok=False ok False break if ok:
    print("Yes")
else:
    print("No") ok print("Yes") print "Yes" print("No") print "No" ok=True True ok ok=False False ok a=input() input() a ok=False False ok
a=input()
ok=True
for i in range(len(a)):
    if (i+1)%2==0 and a[i]=="R":
        ok=False
        break
    if (i+1)%2==1 and a[i]=="L":
        ok=False
        break
 
if ok:
    print("Yes")
else:
    print("No")