s = str(input())
count = 0
a = ["R", "U", "D"]
b = ["L", "U", "D"]
for i in s[::2]:
    if i in a:
        pass
    else:
        count = 1
        break
for i in s[1::2]:
    if i in b:
        pass
    else:
        count = 1
        break
print("Yes" if count == 0 else "No") s = str(input()) s str(input()) str input() input count = 0 count 0 a = ["R", "U", "D"] a ["R", "U", "D"] "R" "U" "D" b = ["L", "U", "D"] b ["L", "U", "D"] "L" "U" "D" for i in s[::2]:
    if i in a:
        pass
    else:
        count = 1
        break i s[::2] s ::2 2 if i in a:
        pass
    else:
        count = 1
        break i in a i a count = 1 count 1 break for i in s[1::2]:
    if i in b:
        pass
    else:
        count = 1
        break i s[1::2] s 1::2 1 2 if i in b:
        pass
    else:
        count = 1
        break i in b i b count = 1 count 1 break print("Yes" if count == 0 else "No") print "Yes" if count == 0 else "No" count == 0 count 0 "Yes" "No" count = 1 1 count s = str(input()) str(input()) s a = ["R", "U", "D"] ["R", "U", "D"] a count = 0 0 count b = ["L", "U", "D"] ["L", "U", "D"] b count = 1 1 count
s = str(input())
count = 0
a = ["R", "U", "D"]
b = ["L", "U", "D"]
for i in s[::2]:
    if i in a:
        pass
    else:
        count = 1
        break
for i in s[1::2]:
    if i in b:
        pass
    else:
        count = 1
        break
print("Yes" if count == 0 else "No")