s=input()
c=0
for i in range(len(s)):
    if i % 2 == 0 and s[i] in ["R","U","D"]:
        c += 1
    elif i % 2 == 1 and s[i] in ["L","U","D"]:
        c += 1
print("Yes" if c == len(s) else "No") s=input() s input() input c=0 c 0 for i in range(len(s)):
    if i % 2 == 0 and s[i] in ["R","U","D"]:
        c += 1
    elif i % 2 == 1 and s[i] in ["L","U","D"]:
        c += 1 i range(len(s)) range len(s) len s if i % 2 == 0 and s[i] in ["R","U","D"]:
        c += 1
    elif i % 2 == 1 and s[i] in ["L","U","D"]:
        c += 1 i % 2 == 0 and s[i] in ["R","U","D"] i % 2 == 0 i % 2 i 2 0 s[i] in ["R","U","D"] s[i] s i ["R","U","D"] "R" "U" "D" c += 1 c 1 elif i % 2 == 1 and s[i] in ["L","U","D"]:
        c += 1 i % 2 == 1 and s[i] in ["L","U","D"] i % 2 == 1 i % 2 i 2 1 s[i] in ["L","U","D"] s[i] s i ["L","U","D"] "L" "U" "D" c += 1 c 1 print("Yes" if c == len(s) else "No") print "Yes" if c == len(s) else "No" c == len(s) c len(s) len s "Yes" "No" s=input() input() s c=0 0 c c += 1 1 c c += 1 1 c
s=input()
c=0
for i in range(len(s)):
    if i % 2 == 0 and s[i] in ["R","U","D"]:
        c += 1
    elif i % 2 == 1 and s[i] in ["L","U","D"]:
        c += 1
print("Yes" if c == len(s) else "No")