s = input()

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

for i in range(1, len(s) + 1):
    if i % 2 == 1:
        if s[i - 1] == "R" or s[i - 1] == "U" or s[i - 1] == "D":
            continue
        else:
            print("No")
            break
    else:
        if s[i - 1] == "L" or s[i - 1] == "U" or s[i - 1] == "D":
            continue
        else:
            print("No")
            break
else:
    print("Yes")