S=input()
count=0
s=list(S)
for i in range(len(S)):
    if (i+1)%2!=0:
        if s[i]=='R' or s[i]=='U' or s[i]=='D':
            count+=1
    else:
        if s[i]=='L' or s[i]=='U' or s[i]=='D':
            count+=1
if count==len(S):
    print('Yes')
else:
    print('No') S=input() S input() input count=0 count 0 s=list(S) s list(S) list S for i in range(len(S)):
    if (i+1)%2!=0:
        if s[i]=='R' or s[i]=='U' or s[i]=='D':
            count+=1
    else:
        if s[i]=='L' or s[i]=='U' or s[i]=='D':
            count+=1 i range(len(S)) range len(S) len S if (i+1)%2!=0:
        if s[i]=='R' or s[i]=='U' or s[i]=='D':
            count+=1
    else:
        if s[i]=='L' or s[i]=='U' or s[i]=='D':
            count+=1 (i+1)%2!=0 (i+1)%2 i+1 i 1 2 0 if s[i]=='R' or s[i]=='U' or s[i]=='D':
            count+=1
     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' count+=1 count 1 if s[i]=='L' or s[i]=='U' or s[i]=='D':
            count+=1 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' count+=1 count 1 if count==len(S):
    print('Yes')
else:
    print('No') count==len(S) count len(S) len S print('Yes') print 'Yes' print('No') print 'No' s=list(S) list(S) s S=input() input() S count+=1 1 count count=0 0 count count+=1 1 count
S=input()
count=0
s=list(S)
for i in range(len(S)):
    if (i+1)%2!=0:
        if s[i]=='R' or s[i]=='U' or s[i]=='D':
            count+=1
    else:
        if s[i]=='L' or s[i]=='U' or s[i]=='D':
            count+=1
if count==len(S):
    print('Yes')
else:
    print('No')