s = input()
k = True

for i in range(1, len(s)+1):
    if i % 2 == 1:
        if s[i-1] == 'R' or s[i-1] == 'U' or s[i-1] == 'D':
            pass
        else:
            k = False
            break
    elif i % 2 == 0:
        if s[i-1] == 'L' or s[i-1] == 'U' or s[i-1] == 'D':
            pass
        else:
            k = False
            break

if k == True:
    print("Yes")
elif k == False:
    print("No") s = input() s input() input k = True k True for i in range(1, len(s)+1):
    if i % 2 == 1:
        if s[i-1] == 'R' or s[i-1] == 'U' or s[i-1] == 'D':
            pass
        else:
            k = False
            break
    elif i % 2 == 0:
        if s[i-1] == 'L' or s[i-1] == 'U' or s[i-1] == 'D':
            pass
        else:
            k = False
            break i range(1, len(s)+1) range 1 len(s)+1 len(s) len s 1 if i % 2 == 1:
        if s[i-1] == 'R' or s[i-1] == 'U' or s[i-1] == 'D':
            pass
        else:
            k = False
            break
    elif i % 2 == 0:
        if s[i-1] == 'L' or s[i-1] == 'U' or s[i-1] == 'D':
            pass
        else:
            k = False
            break i % 2 == 1 i % 2 i 2 1 if s[i-1] == 'R' or s[i-1] == 'U' or s[i-1] == 'D':
            pass
        else:
            k = False
            break
     s[i-1] == 'R' or s[i-1] == 'U' or s[i-1] == 'D' s[i-1] == 'R' or s[i-1] == 'U' s[i-1] == 'R' s[i-1] s i-1 i 1 'R' s[i-1] == 'U' s[i-1] s i-1 i 1 'U' s[i-1] == 'D' s[i-1] s i-1 i 1 'D' k = False k False break elif i % 2 == 0:
        if s[i-1] == 'L' or s[i-1] == 'U' or s[i-1] == 'D':
            pass
        else:
            k = False
            break i % 2 == 0 i % 2 i 2 0 if s[i-1] == 'L' or s[i-1] == 'U' or s[i-1] == 'D':
            pass
        else:
            k = False
            break s[i-1] == 'L' or s[i-1] == 'U' or s[i-1] == 'D' s[i-1] == 'L' or s[i-1] == 'U' s[i-1] == 'L' s[i-1] s i-1 i 1 'L' s[i-1] == 'U' s[i-1] s i-1 i 1 'U' s[i-1] == 'D' s[i-1] s i-1 i 1 'D' k = False k False break if k == True:
    print("Yes")
elif k == False:
    print("No") k == True k True print("Yes") print "Yes" elif k == False:
    print("No") k == False k False print("No") print "No" k = False False k k = False False k s = input() input() s k = True True k
s = input()
k = True

for i in range(1, len(s)+1):
    if i % 2 == 1:
        if s[i-1] == 'R' or s[i-1] == 'U' or s[i-1] == 'D':
            pass
        else:
            k = False
            break
    elif i % 2 == 0:
        if s[i-1] == 'L' or s[i-1] == 'U' or s[i-1] == 'D':
            pass
        else:
            k = False
            break

if k == True:
    print("Yes")
elif k == False:
    print("No")
