s = input()
odd = ["R", "U", "D"]
even = ["L", "U", "D"]

for i in range(len(s)):
    if i%2 == 0:
        if not s[i] in odd:
            print("No")
            exit(0)
    else:
        if not s[i] in even:
            print("No")
            exit(0)

print("Yes") s = input() s input() input odd = ["R", "U", "D"] odd ["R", "U", "D"] "R" "U" "D" even = ["L", "U", "D"] even ["L", "U", "D"] "L" "U" "D" for i in range(len(s)):
    if i%2 == 0:
        if not s[i] in odd:
            print("No")
            exit(0)
    else:
        if not s[i] in even:
            print("No")
            exit(0) i range(len(s)) range len(s) len s if i%2 == 0:
        if not s[i] in odd:
            print("No")
            exit(0)
    else:
        if not s[i] in even:
            print("No")
            exit(0) i%2 == 0 i%2 i 2 0 if not s[i] in odd:
            print("No")
            exit(0)
     not s[i] in odd s[i] in odd s[i] s i odd print("No") print "No" exit(0) exit 0 if not s[i] in even:
            print("No")
            exit(0) not s[i] in even s[i] in even s[i] s i even print("No") print "No" exit(0) exit 0 print("Yes") print "Yes" even = ["L", "U", "D"] ["L", "U", "D"] even s = input() input() s odd = ["R", "U", "D"] ["R", "U", "D"] odd
s = input()
odd = ["R", "U", "D"]
even = ["L", "U", "D"]

for i in range(len(s)):
    if i%2 == 0:
        if not s[i] in odd:
            print("No")
            exit(0)
    else:
        if not s[i] in even:
            print("No")
            exit(0)

print("Yes")