s = str(input())
z = 'Yes'
for i in range(len(s)):
    if i%2 == 0:
        if s[i] != 'R' and s[i] != 'U' and s[i] != 'D':
            z = 'No'
            break
    else:
        if s[i] != 'L' and s[i] != 'U' and s[i] != 'D':
            z = 'No'
            break
print(z) s = str(input()) s str(input()) str input() input z = 'Yes' z 'Yes' for i in range(len(s)):
    if i%2 == 0:
        if s[i] != 'R' and s[i] != 'U' and s[i] != 'D':
            z = 'No'
            break
    else:
        if s[i] != 'L' and s[i] != 'U' and s[i] != 'D':
            z = 'No'
            break i range(len(s)) range len(s) len s if i%2 == 0:
        if s[i] != 'R' and s[i] != 'U' and s[i] != 'D':
            z = 'No'
            break
    else:
        if s[i] != 'L' and s[i] != 'U' and s[i] != 'D':
            z = 'No'
            break i%2 == 0 i%2 i 2 0 if s[i] != 'R' and s[i] != 'U' and s[i] != 'D':
            z = 'No'
            break
     s[i] != 'R' and s[i] != 'U' and s[i] != 'D' s[i] != 'R' and s[i] != 'U' s[i] != 'R' s[i] s i 'R' s[i] != 'U' s[i] s i 'U' s[i] != 'D' s[i] s i 'D' z = 'No' z 'No' break if s[i] != 'L' and s[i] != 'U' and s[i] != 'D':
            z = 'No'
            break s[i] != 'L' and s[i] != 'U' and s[i] != 'D' s[i] != 'L' and s[i] != 'U' s[i] != 'L' s[i] s i 'L' s[i] != 'U' s[i] s i 'U' s[i] != 'D' s[i] s i 'D' z = 'No' z 'No' break print(z) print z s = str(input()) str(input()) s z = 'Yes' 'Yes' z z = 'No' 'No' z z = 'No' 'No' z
s = str(input())
z = 'Yes'
for i in range(len(s)):
    if i%2 == 0:
        if s[i] != 'R' and s[i] != 'U' and s[i] != 'D':
            z = 'No'
            break
    else:
        if s[i] != 'L' and s[i] != 'U' and s[i] != 'D':
            z = 'No'
            break
print(z)