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