#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))

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

 s = input() s input() input ans = "Yes" ans "Yes" for i in range(len(s)):
    if ((i+1) % 2 == 1):
        if (s[i] != "R" and s[i] != "U" and s[i] != "D"):
            ans = "No"
            break
    else:
        if (s[i] != "L" and s[i] != "U" and s[i] != "D"):
            ans = "No"
            break i range(len(s)) range len(s) len s if ((i+1) % 2 == 1):
        if (s[i] != "R" and s[i] != "U" and s[i] != "D"):
            ans = "No"
            break
    else:
        if (s[i] != "L" and s[i] != "U" and s[i] != "D"):
            ans = "No"
            break (i+1) % 2 == 1 (i+1) % 2 i+1 i 1 2 1 if (s[i] != "R" and s[i] != "U" and s[i] != "D"):
            ans = "No"
            break
     s[i] != "R" and s[i] != "U" and s[i] != "D" s[i] != "R" and s[i] != "U" s[i] != "R" s[i] s i "R" s[i] != "U" s[i] s i "U" s[i] != "D" s[i] s i "D" ans = "No" ans "No" break if (s[i] != "L" and s[i] != "U" and s[i] != "D"):
            ans = "No"
            break s[i] != "L" and s[i] != "U" and s[i] != "D" s[i] != "L" and s[i] != "U" 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 ans = "No" "No" ans ans = "Yes" "Yes" ans s = input() input() s
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))

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


