s = input()
import sys
n = len(s)
kisuu = ["R","U","D"]
guusuu = ["L","U","D"]

for i in range(n):
    if i%2 == 0:
        if s[i] not in kisuu:
            break
    else:
        if s[i] not in guusuu:
            break
else:
    print("Yes")
    sys.exit()
print("No") s = input() s input() input import sys sys n = len(s) n len(s) len s kisuu = ["R","U","D"] kisuu ["R","U","D"] "R" "U" "D" guusuu = ["L","U","D"] guusuu ["L","U","D"] "L" "U" "D" for i in range(n):
    if i%2 == 0:
        if s[i] not in kisuu:
            break
    else:
        if s[i] not in guusuu:
            break
else:
    print("Yes")
    sys.exit() i range(n) range n if i%2 == 0:
        if s[i] not in kisuu:
            break
    else:
        if s[i] not in guusuu:
            break i%2 == 0 i%2 i 2 0 if s[i] not in kisuu:
            break
     s[i] not in kisuu s[i] s i kisuu break if s[i] not in guusuu:
            break s[i] not in guusuu s[i] s i guusuu break print("Yes") print "Yes" sys.exit() sys.exit sys exit print("No") print "No" s = input() input() s n = len(s) len(s) n kisuu = ["R","U","D"] ["R","U","D"] kisuu guusuu = ["L","U","D"] ["L","U","D"] guusuu
s = input()
import sys
n = len(s)
kisuu = ["R","U","D"]
guusuu = ["L","U","D"]

for i in range(n):
    if i%2 == 0:
        if s[i] not in kisuu:
            break
    else:
        if s[i] not in guusuu:
            break
else:
    print("Yes")
    sys.exit()
print("No")