import sys
s=input()
l = len(s)
c=0
for i in range(l):
    if i%2==0:
        if s[i]=="R" or s[i]=="U" or s[i]=="D":
            continue
        else:
            c=1
            break
    if i%2==1:
        if s[i]=="L" or s[i]=="U" or s[i]=="D":
            continue
        else:
            c=1
            break
            
if c==1:
    print("No")
if c==0:
    print("Yes") import sys sys s=input() s input() input l = len(s) l len(s) len s c=0 c 0 for i in range(l):
    if i%2==0:
        if s[i]=="R" or s[i]=="U" or s[i]=="D":
            continue
        else:
            c=1
            break
    if i%2==1:
        if s[i]=="L" or s[i]=="U" or s[i]=="D":
            continue
        else:
            c=1
            break
             i range(l) range l if i%2==0:
        if s[i]=="R" or s[i]=="U" or s[i]=="D":
            continue
        else:
            c=1
            break
     i%2==0 i%2 i 2 0 if s[i]=="R" or s[i]=="U" or s[i]=="D":
            continue
        else:
            c=1
            break
     s[i]=="R" or s[i]=="U" or s[i]=="D" s[i]=="R" or s[i]=="U" s[i]=="R" s[i] s i "R" s[i]=="U" s[i] s i "U" s[i]=="D" s[i] s i "D" continue c=1 c 1 break if i%2==1:
        if s[i]=="L" or s[i]=="U" or s[i]=="D":
            continue
        else:
            c=1
            break
             i%2==1 i%2 i 2 1 if s[i]=="L" or s[i]=="U" or s[i]=="D":
            continue
        else:
            c=1
            break
             s[i]=="L" or s[i]=="U" or s[i]=="D" s[i]=="L" or s[i]=="U" s[i]=="L" s[i] s i "L" s[i]=="U" s[i] s i "U" s[i]=="D" s[i] s i "D" continue c=1 c 1 break if c==1:
    print("No") c==1 c 1 print("No") print "No" if c==0:
    print("Yes") c==0 c 0 print("Yes") print "Yes" s=input() input() s c=1 1 c c=1 1 c c=0 0 c l = len(s) len(s) l
import sys
s=input()
l = len(s)
c=0
for i in range(l):
    if i%2==0:
        if s[i]=="R" or s[i]=="U" or s[i]=="D":
            continue
        else:
            c=1
            break
    if i%2==1:
        if s[i]=="L" or s[i]=="U" or s[i]=="D":
            continue
        else:
            c=1
            break
            
if c==1:
    print("No")
if c==0:
    print("Yes")