S = input()
point = 0
l = len(S)
i = 0
while i < l:
    if int(i % 2) == 1:
        if S[i] == 'L' or S[i] == 'U' or S[i] == 'D':
            point += 1
    else:
        if S[i] == 'R' or S[i] == 'U' or S[i] == 'D':
            point += 1
    i += 1

if point == l:
    print('Yes')
else:
    print('No') S = input() S input() input point = 0 point 0 l = len(S) l len(S) len S i = 0 i 0 while i < l:
    if int(i % 2) == 1:
        if S[i] == 'L' or S[i] == 'U' or S[i] == 'D':
            point += 1
    else:
        if S[i] == 'R' or S[i] == 'U' or S[i] == 'D':
            point += 1
    i += 1 i < l i l if int(i % 2) == 1:
        if S[i] == 'L' or S[i] == 'U' or S[i] == 'D':
            point += 1
    else:
        if S[i] == 'R' or S[i] == 'U' or S[i] == 'D':
            point += 1
     int(i % 2) == 1 int(i % 2) int i % 2 i 2 1 if S[i] == 'L' or S[i] == 'U' or S[i] == 'D':
            point += 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' point += 1 point 1 if S[i] == 'R' or S[i] == 'U' or S[i] == 'D':
            point += 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' point += 1 point 1 i += 1 i 1 if point == l:
    print('Yes')
else:
    print('No') point == l point l print('Yes') print 'Yes' print('No') print 'No' S = input() input() S point += 1 1 point l = len(S) len(S) l point += 1 1 point point = 0 0 point i = 0 0 i i += 1 1 i
S = input()
point = 0
l = len(S)
i = 0
while i < l:
    if int(i % 2) == 1:
        if S[i] == 'L' or S[i] == 'U' or S[i] == 'D':
            point += 1
    else:
        if S[i] == 'R' or S[i] == 'U' or S[i] == 'D':
            point += 1
    i += 1

if point == l:
    print('Yes')
else:
    print('No')