S = input()
N = len(S)

# 1,3,...文字目が'R'でも'U'でも'D'でもない、または、2,4,...文字目が'L'でも'U'でも'D'でもないとき、'No'を出力する
ans = 'Yes'
for i in range(N):
  if (i % 2 == 0 and S[i] != 'R' and S[i] != 'U' and S[i] != 'D') or (i % 2 == 1 and S[i] != 'L' and S[i] != 'U' and S[i] != 'D'):
    ans = 'No'
    break
    
print(ans) S = input() S input() input N = len(S) N len(S) len S ans = 'Yes' ans 'Yes' for i in range(N):
  if (i % 2 == 0 and S[i] != 'R' and S[i] != 'U' and S[i] != 'D') or (i % 2 == 1 and S[i] != 'L' and S[i] != 'U' and S[i] != 'D'):
    ans = 'No'
    break
     i range(N) range N if (i % 2 == 0 and S[i] != 'R' and S[i] != 'U' and S[i] != 'D') or (i % 2 == 1 and S[i] != 'L' and S[i] != 'U' and S[i] != 'D'):
    ans = 'No'
    break
     (i % 2 == 0 and S[i] != 'R' and S[i] != 'U' and S[i] != 'D') or (i % 2 == 1 and S[i] != 'L' and S[i] != 'U' and S[i] != 'D') i % 2 == 0 and S[i] != 'R' and S[i] != 'U' and S[i] != 'D' i % 2 == 0 and S[i] != 'R' and S[i] != 'U' i % 2 == 0 and S[i] != 'R' i % 2 == 0 i % 2 i 2 0 S[i] != 'R' S[i] S i 'R' S[i] != 'U' S[i] S i 'U' S[i] != 'D' S[i] S i 'D' i % 2 == 1 and S[i] != 'L' and S[i] != 'U' and S[i] != 'D' i % 2 == 1 and S[i] != 'L' and S[i] != 'U' i % 2 == 1 and S[i] != 'L' i % 2 == 1 i % 2 i 2 1 S[i] != 'L' S[i] S i 'L' S[i] != 'U' S[i] S i 'U' S[i] != 'D' S[i] S i 'D' ans = 'No' ans 'No' break print(ans) print ans ans = 'No' 'No' ans S = input() input() S N = len(S) len(S) N ans = 'Yes' 'Yes' ans
S = input()
N = len(S)

# 1,3,...文字目が'R'でも'U'でも'D'でもない、または、2,4,...文字目が'L'でも'U'でも'D'でもないとき、'No'を出力する
ans = 'Yes'
for i in range(N):
  if (i % 2 == 0 and S[i] != 'R' and S[i] != 'U' and S[i] != 'D') or (i % 2 == 1 and S[i] != 'L' and S[i] != 'U' and S[i] != 'D'):
    ans = 'No'
    break
    
print(ans)