s = input()
o = ['R','U','D']
e = ['L','U','D']
ans = 'Yes'
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] not in o:
            ans = 'No'
    else:
        if s[i] not in e:
            ans = 'No'
print(ans) s = input() s input() input o = ['R','U','D'] o ['R','U','D'] 'R' 'U' 'D' e = ['L','U','D'] e ['L','U','D'] 'L' 'U' 'D' ans = 'Yes' ans 'Yes' for i in range(len(s)):
    if i % 2 == 0:
        if s[i] not in o:
            ans = 'No'
    else:
        if s[i] not in e:
            ans = 'No' i range(len(s)) range len(s) len s if i % 2 == 0:
        if s[i] not in o:
            ans = 'No'
    else:
        if s[i] not in e:
            ans = 'No' i % 2 == 0 i % 2 i 2 0 if s[i] not in o:
            ans = 'No'
     s[i] not in o s[i] s i o ans = 'No' ans 'No' if s[i] not in e:
            ans = 'No' s[i] not in e s[i] s i e ans = 'No' ans 'No' print(ans) print ans e = ['L','U','D'] ['L','U','D'] e ans = 'No' 'No' ans ans = 'No' 'No' ans s = input() input() s o = ['R','U','D'] ['R','U','D'] o ans = 'Yes' 'Yes' ans
s = input()
o = ['R','U','D']
e = ['L','U','D']
ans = 'Yes'
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] not in o:
            ans = 'No'
    else:
        if s[i] not in e:
            ans = 'No'
print(ans)