S = input()
cnt = 0
for s in S[::2]:
    if s in {"R", "U", "D"}:
        cnt += 1
for s in S[1::2]:
    if s in {"L", "U", "D"}:
        cnt += 1
if cnt == len(S):
    print("Yes")
    exit()
print("No")
 S = input() S input() input cnt = 0 cnt 0 for s in S[::2]:
    if s in {"R", "U", "D"}:
        cnt += 1 s S[::2] S ::2 2 if s in {"R", "U", "D"}:
        cnt += 1 s in {"R", "U", "D"} s {"R", "U", "D"} cnt += 1 cnt 1 for s in S[1::2]:
    if s in {"L", "U", "D"}:
        cnt += 1 s S[1::2] S 1::2 1 2 if s in {"L", "U", "D"}:
        cnt += 1 s in {"L", "U", "D"} s {"L", "U", "D"} cnt += 1 cnt 1 if cnt == len(S):
    print("Yes")
    exit() cnt == len(S) cnt len(S) len S print("Yes") print "Yes" exit() exit print("No") print "No" S = input() input() S cnt += 1 1 cnt cnt = 0 0 cnt cnt += 1 1 cnt
S = input()
cnt = 0
for s in S[::2]:
    if s in {"R", "U", "D"}:
        cnt += 1
for s in S[1::2]:
    if s in {"L", "U", "D"}:
        cnt += 1
if cnt == len(S):
    print("Yes")
    exit()
print("No")

