str = input()
ans = "Yes"
for i in range(len(str)):
  if (i + 1) % 2 == 0 and str[i] not in ('L', 'U', 'D'):
    ans = "No"
  if (i + 1) % 2 == 1 and str[i] not in ('R', 'U', 'D'):
    ans = "No"
 
print(ans) str = input() str input() input ans = "Yes" ans "Yes" for i in range(len(str)):
  if (i + 1) % 2 == 0 and str[i] not in ('L', 'U', 'D'):
    ans = "No"
  if (i + 1) % 2 == 1 and str[i] not in ('R', 'U', 'D'):
    ans = "No"
  i range(len(str)) range len(str) len str if (i + 1) % 2 == 0 and str[i] not in ('L', 'U', 'D'):
    ans = "No"
   (i + 1) % 2 == 0 and str[i] not in ('L', 'U', 'D') (i + 1) % 2 == 0 (i + 1) % 2 i + 1 i 1 2 0 str[i] not in ('L', 'U', 'D') str[i] str i ('L', 'U', 'D') 'L' 'U' 'D' ans = "No" ans "No" if (i + 1) % 2 == 1 and str[i] not in ('R', 'U', 'D'):
    ans = "No"
  (i + 1) % 2 == 1 and str[i] not in ('R', 'U', 'D') (i + 1) % 2 == 1 (i + 1) % 2 i + 1 i 1 2 1 str[i] not in ('R', 'U', 'D') str[i] str i ('R', 'U', 'D') 'R' 'U' 'D' ans = "No" ans "No" print(ans) print ans ans = "Yes" "Yes" ans str = input() input() str ans = "No" "No" ans ans = "No" "No" ans
str = input()
ans = "Yes"
for i in range(len(str)):
  if (i + 1) % 2 == 0 and str[i] not in ('L', 'U', 'D'):
    ans = "No"
  if (i + 1) % 2 == 1 and str[i] not in ('R', 'U', 'D'):
    ans = "No"
 
print(ans)