S = input()

cnt = 0
for i in range(len(S)):
    if i % 2 == 0 and S[i] == "R" or S[i] == "U" or S[i] == "D":
        cnt += 1
    elif i % 2 == 1 and S[i] == "L" or S[i] == "U" or S[i] == "D":
        cnt += 1

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

cnt = 0
for i in range(len(S)):
    if i % 2 == 0 and S[i] == "R" or S[i] == "U" or S[i] == "D":
        cnt += 1
    elif i % 2 == 1 and S[i] == "L" or S[i] == "U" or S[i] == "D":
        cnt += 1

if cnt == len(S):
    print("Yes")
else:
    print("No")