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