s = input()

L = ['R', 'U', 'D']
M = ['L', 'U', 'D']

lens = len(s)
cnt = 0

for i in range(lens):
    if (i+1)%2 == 1 and s[i] in L:
        cnt += 1
    elif (i+1)%2 == 0 and s[i] in M:
        cnt += 1

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

L = ['R', 'U', 'D']
M = ['L', 'U', 'D']

lens = len(s)
cnt = 0

for i in range(lens):
    if (i+1)%2 == 1 and s[i] in L:
        cnt += 1
    elif (i+1)%2 == 0 and s[i] in M:
        cnt += 1

if cnt == lens:
    print('Yes')
else :
    print('No')
        
