s = input()
odd = ["R","U","D"]
even = ["L","U","D"]
cnt = 0
for i in s[::2]:
    if i in odd:
        cnt += 1
for j in s[1::2]:
    if j in even:
        cnt += 1
        
print("Yes") if cnt == len(s) else print("No") 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" cnt = 0 cnt 0 for i in s[::2]:
    if i in odd:
        cnt += 1 i s[::2] s ::2 2 if i in odd:
        cnt += 1 i in odd i odd cnt += 1 cnt 1 for j in s[1::2]:
    if j in even:
        cnt += 1
         j s[1::2] s 1::2 1 2 if j in even:
        cnt += 1
         j in even j even cnt += 1 cnt 1 print("Yes") if cnt == len(s) else print("No") cnt == len(s) cnt len(s) len s print("Yes") print "Yes" print("No") print "No" odd = ["R","U","D"] ["R","U","D"] odd even = ["L","U","D"] ["L","U","D"] even cnt = 0 0 cnt s = input() input() s cnt += 1 1 cnt cnt += 1 1 cnt
s = input()
odd = ["R","U","D"]
even = ["L","U","D"]
cnt = 0
for i in s[::2]:
    if i in odd:
        cnt += 1
for j in s[1::2]:
    if j in even:
        cnt += 1
        
print("Yes") if cnt == len(s) else print("No")