s = list(input())
cnt = 0
for i in range(len(s)):
    if i % 2 == 0 and s[i] in ['R', 'U', 'D']:
        cnt += 1
    elif i % 2 == 1 and s[i] in ['L', 'U', 'D']:
        cnt += 1
print('Yes' if cnt == len(s) else 'No') s = list(input()) s list(input()) list input() input cnt = 0 cnt 0 for i in range(len(s)):
    if i % 2 == 0 and s[i] in ['R', 'U', 'D']:
        cnt += 1
    elif i % 2 == 1 and s[i] in ['L', 'U', 'D']:
        cnt += 1 i range(len(s)) range len(s) len s if i % 2 == 0 and s[i] in ['R', 'U', 'D']:
        cnt += 1
    elif i % 2 == 1 and s[i] in ['L', 'U', 'D']:
        cnt += 1 i % 2 == 0 and s[i] in ['R', 'U', 'D'] i % 2 == 0 i % 2 i 2 0 s[i] in ['R', 'U', 'D'] s[i] s i ['R', 'U', 'D'] 'R' 'U' 'D' cnt += 1 cnt 1 elif i % 2 == 1 and s[i] in ['L', 'U', 'D']:
        cnt += 1 i % 2 == 1 and s[i] in ['L', 'U', 'D'] i % 2 == 1 i % 2 i 2 1 s[i] in ['L', 'U', 'D'] s[i] s i ['L', 'U', 'D'] 'L' 'U' 'D' cnt += 1 cnt 1 print('Yes' if cnt == len(s) else 'No') print 'Yes' if cnt == len(s) else 'No' cnt == len(s) cnt len(s) len s 'Yes' 'No' cnt += 1 1 cnt s = list(input()) list(input()) s cnt = 0 0 cnt cnt += 1 1 cnt
s = list(input())
cnt = 0
for i in range(len(s)):
    if i % 2 == 0 and s[i] in ['R', 'U', 'D']:
        cnt += 1
    elif i % 2 == 1 and s[i] in ['L', 'U', 'D']:
        cnt += 1
print('Yes' if cnt == len(s) else 'No')