s=input()
s_=list(s)
S=list(enumerate(s))
num=len(S)
empty=[]
for x,y in S:
    if (x%2==0 and (y=='R' or y=='U' or y=='D')) or (x%2==1 and (y=='L' or y=='U' or y=='D')):
        empty.append(y)
if empty==s_:
    print('Yes')
else:
    print('No') s=input() s input() input s_=list(s) s_ list(s) list s S=list(enumerate(s)) S list(enumerate(s)) list enumerate(s) enumerate s num=len(S) num len(S) len S empty=[] empty [] for x,y in S:
    if (x%2==0 and (y=='R' or y=='U' or y=='D')) or (x%2==1 and (y=='L' or y=='U' or y=='D')):
        empty.append(y) x y S if (x%2==0 and (y=='R' or y=='U' or y=='D')) or (x%2==1 and (y=='L' or y=='U' or y=='D')):
        empty.append(y) (x%2==0 and (y=='R' or y=='U' or y=='D')) or (x%2==1 and (y=='L' or y=='U' or y=='D')) x%2==0 and (y=='R' or y=='U' or y=='D') x%2==0 x%2 x 2 0 y=='R' or y=='U' or y=='D' y=='R' or y=='U' y=='R' y 'R' y=='U' y 'U' y=='D' y 'D' x%2==1 and (y=='L' or y=='U' or y=='D') x%2==1 x%2 x 2 1 y=='L' or y=='U' or y=='D' y=='L' or y=='U' y=='L' y 'L' y=='U' y 'U' y=='D' y 'D' empty.append(y) empty.append empty append y if empty==s_:
    print('Yes')
else:
    print('No') empty==s_ empty s_ print('Yes') print 'Yes' print('No') print 'No' num=len(S) len(S) num empty=[] [] empty S=list(enumerate(s)) list(enumerate(s)) S s=input() input() s s_=list(s) list(s) s_
s=input()
s_=list(s)
S=list(enumerate(s))
num=len(S)
empty=[]
for x,y in S:
    if (x%2==0 and (y=='R' or y=='U' or y=='D')) or (x%2==1 and (y=='L' or y=='U' or y=='D')):
        empty.append(y)
if empty==s_:
    print('Yes')
else:
    print('No')
