s = input()
l = len(s)
o = ["R", "U", "D"]
e = ["L", "U", "D"]
x = 1
for i in range(l):
    if i == (2 * int(i / 2)):
        if s[i] not in o:
            x = 0
    else:
        if s[i] not in e:
            x = 0
print("Yes" if x == 1 else "No") s = input() s input() input l = len(s) l len(s) len s o = ["R", "U", "D"] o ["R", "U", "D"] "R" "U" "D" e = ["L", "U", "D"] e ["L", "U", "D"] "L" "U" "D" x = 1 x 1 for i in range(l):
    if i == (2 * int(i / 2)):
        if s[i] not in o:
            x = 0
    else:
        if s[i] not in e:
            x = 0 i range(l) range l if i == (2 * int(i / 2)):
        if s[i] not in o:
            x = 0
    else:
        if s[i] not in e:
            x = 0 i == (2 * int(i / 2)) i 2 * int(i / 2) 2 int(i / 2) int i / 2 i 2 if s[i] not in o:
            x = 0
     s[i] not in o s[i] s i o x = 0 x 0 if s[i] not in e:
            x = 0 s[i] not in e s[i] s i e x = 0 x 0 print("Yes" if x == 1 else "No") print "Yes" if x == 1 else "No" x == 1 x 1 "Yes" "No" s = input() input() s x = 1 1 x x = 0 0 x o = ["R", "U", "D"] ["R", "U", "D"] o x = 0 0 x l = len(s) len(s) l e = ["L", "U", "D"] ["L", "U", "D"] e
s = input()
l = len(s)
o = ["R", "U", "D"]
e = ["L", "U", "D"]
x = 1
for i in range(l):
    if i == (2 * int(i / 2)):
        if s[i] not in o:
            x = 0
    else:
        if s[i] not in e:
            x = 0
print("Yes" if x == 1 else "No")