s = input()
n = len(s)
ans = 'Yes'
for i in range(n):
    if i%2 == 0:
        if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
            ans = 'Yes'
        else:
            print('No')
            exit()

    else:
        if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
            ans = 'Yes'
        else:
            print('No')
            exit()

print(ans) s = input() s input() input n = len(s) n len(s) len s ans = 'Yes' ans 'Yes' for i in range(n):
    if i%2 == 0:
        if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
            ans = 'Yes'
        else:
            print('No')
            exit()

    else:
        if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
            ans = 'Yes'
        else:
            print('No')
            exit() i range(n) range n if i%2 == 0:
        if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
            ans = 'Yes'
        else:
            print('No')
            exit()

    else:
        if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
            ans = 'Yes'
        else:
            print('No')
            exit() i%2 == 0 i%2 i 2 0 if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
            ans = 'Yes'
        else:
            print('No')
            exit()

     s[i] == 'R' or s[i] == 'U' or s[i] == 'D' s[i] == 'R' or s[i] == 'U' s[i] == 'R' s[i] s i 'R' s[i] == 'U' s[i] s i 'U' s[i] == 'D' s[i] s i 'D' ans = 'Yes' ans 'Yes' print('No') print 'No' exit() exit if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
            ans = 'Yes'
        else:
            print('No')
            exit() s[i] == 'L' or s[i] == 'U' or s[i] == 'D' s[i] == 'L' or s[i] == 'U' s[i] == 'L' s[i] s i 'L' s[i] == 'U' s[i] s i 'U' s[i] == 'D' s[i] s i 'D' ans = 'Yes' ans 'Yes' print('No') print 'No' exit() exit print(ans) print ans ans = 'Yes' 'Yes' ans ans = 'Yes' 'Yes' ans n = len(s) len(s) n ans = 'Yes' 'Yes' ans s = input() input() s
s = input()
n = len(s)
ans = 'Yes'
for i in range(n):
    if i%2 == 0:
        if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
            ans = 'Yes'
        else:
            print('No')
            exit()

    else:
        if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
            ans = 'Yes'
        else:
            print('No')
            exit()

print(ans)