s = input()
l1 = ['D','R','U']
l2 = ["D",'L','U']
count = 0

for i in s[::2]:
    if i in l1 :
        count += 1
for i in s[1::2]:
    if i in l2:
        count += 1
    
if count == len(s):
    print('Yes')
else:
    print('No') s = input() s input() input l1 = ['D','R','U'] l1 ['D','R','U'] 'D' 'R' 'U' l2 = ["D",'L','U'] l2 ["D",'L','U'] "D" 'L' 'U' count = 0 count 0 for i in s[::2]:
    if i in l1 :
        count += 1 i s[::2] s ::2 2 if i in l1 :
        count += 1 i in l1 i l1 count += 1 count 1 for i in s[1::2]:
    if i in l2:
        count += 1
     i s[1::2] s 1::2 1 2 if i in l2:
        count += 1
     i in l2 i l2 count += 1 count 1 if count == len(s):
    print('Yes')
else:
    print('No') count == len(s) count len(s) len s print('Yes') print 'Yes' print('No') print 'No' l2 = ["D",'L','U'] ["D",'L','U'] l2 l1 = ['D','R','U'] ['D','R','U'] l1 count += 1 1 count count = 0 0 count count += 1 1 count s = input() input() s
s = input()
l1 = ['D','R','U']
l2 = ["D",'L','U']
count = 0

for i in s[::2]:
    if i in l1 :
        count += 1
for i in s[1::2]:
    if i in l2:
        count += 1
    
if count == len(s):
    print('Yes')
else:
    print('No')