# coding: utf-8

str = input()
table = list(str)
count = 0
for i in range(len(table)):
    if i % 2 == 0:
      if table[i] == 'R' or table[i] == 'U' or table[i] == 'D':
         count += 1
    elif i % 2 == 1:
      if table[i] == 'L' or table[i] == 'U' or table[i] == 'D':
         count += 1

if count == len(str):
    print("Yes")
else:
    print("No") str = input() str input() input table = list(str) table list(str) list str count = 0 count 0 for i in range(len(table)):
    if i % 2 == 0:
      if table[i] == 'R' or table[i] == 'U' or table[i] == 'D':
         count += 1
    elif i % 2 == 1:
      if table[i] == 'L' or table[i] == 'U' or table[i] == 'D':
         count += 1 i range(len(table)) range len(table) len table if i % 2 == 0:
      if table[i] == 'R' or table[i] == 'U' or table[i] == 'D':
         count += 1
    elif i % 2 == 1:
      if table[i] == 'L' or table[i] == 'U' or table[i] == 'D':
         count += 1 i % 2 == 0 i % 2 i 2 0 if table[i] == 'R' or table[i] == 'U' or table[i] == 'D':
         count += 1
     table[i] == 'R' or table[i] == 'U' or table[i] == 'D' table[i] == 'R' or table[i] == 'U' table[i] == 'R' table[i] table i 'R' table[i] == 'U' table[i] table i 'U' table[i] == 'D' table[i] table i 'D' count += 1 count 1 elif i % 2 == 1:
      if table[i] == 'L' or table[i] == 'U' or table[i] == 'D':
         count += 1 i % 2 == 1 i % 2 i 2 1 if table[i] == 'L' or table[i] == 'U' or table[i] == 'D':
         count += 1 table[i] == 'L' or table[i] == 'U' or table[i] == 'D' table[i] == 'L' or table[i] == 'U' table[i] == 'L' table[i] table i 'L' table[i] == 'U' table[i] table i 'U' table[i] == 'D' table[i] table i 'D' count += 1 count 1 if count == len(str):
    print("Yes")
else:
    print("No") count == len(str) count len(str) len str print("Yes") print "Yes" print("No") print "No" count += 1 1 count table = list(str) list(str) table count += 1 1 count str = input() input() str count = 0 0 count
# coding: utf-8

str = input()
table = list(str)
count = 0
for i in range(len(table)):
    if i % 2 == 0:
      if table[i] == 'R' or table[i] == 'U' or table[i] == 'D':
         count += 1
    elif i % 2 == 1:
      if table[i] == 'L' or table[i] == 'U' or table[i] == 'D':
         count += 1

if count == len(str):
    print("Yes")
else:
    print("No")