S = input()
ok = 1
for i in range(len(S)):
    if i % 2 == 1 and S[i] not in ['L', 'U', 'D']:
        ok = 0
    if i % 2 == 0 and S[i] not in ['R', 'U', 'D']:
        ok = 0
print('Yes' if ok else 'No') S = input() S input() input ok = 1 ok 1 for i in range(len(S)):
    if i % 2 == 1 and S[i] not in ['L', 'U', 'D']:
        ok = 0
    if i % 2 == 0 and S[i] not in ['R', 'U', 'D']:
        ok = 0 i range(len(S)) range len(S) len S if i % 2 == 1 and S[i] not in ['L', 'U', 'D']:
        ok = 0
     i % 2 == 1 and S[i] not in ['L', 'U', 'D'] i % 2 == 1 i % 2 i 2 1 S[i] not in ['L', 'U', 'D'] S[i] S i ['L', 'U', 'D'] 'L' 'U' 'D' ok = 0 ok 0 if i % 2 == 0 and S[i] not in ['R', 'U', 'D']:
        ok = 0 i % 2 == 0 and S[i] not in ['R', 'U', 'D'] i % 2 == 0 i % 2 i 2 0 S[i] not in ['R', 'U', 'D'] S[i] S i ['R', 'U', 'D'] 'R' 'U' 'D' ok = 0 ok 0 print('Yes' if ok else 'No') print 'Yes' if ok else 'No' ok 'Yes' 'No' ok = 0 0 ok ok = 1 1 ok ok = 0 0 ok S = input() input() S
S = input()
ok = 1
for i in range(len(S)):
    if i % 2 == 1 and S[i] not in ['L', 'U', 'D']:
        ok = 0
    if i % 2 == 0 and S[i] not in ['R', 'U', 'D']:
        ok = 0
print('Yes' if ok else 'No')
