import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    s = list(input())
    for i in range(len(s)):
        if s[i] == 'U' or s[i] == 'D':
            pass
        elif i % 2 == 0 and s[i] == 'R':
            pass
        elif i % 2 == 1 and s[i] == 'L':
            pass
        else:
            print('No')
            return
    print('Yes')

if __name__ == '__main__':
    main() import sys sys input = lambda: sys.stdin.readline().rstrip() input lambda: sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip def main():
    s = list(input())
    for i in range(len(s)):
        if s[i] == 'U' or s[i] == 'D':
            pass
        elif i % 2 == 0 and s[i] == 'R':
            pass
        elif i % 2 == 1 and s[i] == 'L':
            pass
        else:
            print('No')
            return
    print('Yes') main s = list(input()) s list(input()) list input() input for i in range(len(s)):
        if s[i] == 'U' or s[i] == 'D':
            pass
        elif i % 2 == 0 and s[i] == 'R':
            pass
        elif i % 2 == 1 and s[i] == 'L':
            pass
        else:
            print('No')
            return
     i range(len(s)) range len(s) len s if s[i] == 'U' or s[i] == 'D':
            pass
        elif i % 2 == 0 and s[i] == 'R':
            pass
        elif i % 2 == 1 and s[i] == 'L':
            pass
        else:
            print('No')
            return
     s[i] == 'U' or s[i] == 'D' s[i] == 'U' s[i] s i 'U' s[i] == 'D' s[i] s i 'D' elif i % 2 == 0 and s[i] == 'R':
            pass
         i % 2 == 0 and s[i] == 'R' i % 2 == 0 i % 2 i 2 0 s[i] == 'R' s[i] s i 'R' elif i % 2 == 1 and s[i] == 'L':
            pass
         i % 2 == 1 and s[i] == 'L' i % 2 == 1 i % 2 i 2 1 s[i] == 'L' s[i] s i 'L' print('No') print 'No' return print('Yes') print 'Yes' if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    s = list(input())
    for i in range(len(s)):
        if s[i] == 'U' or s[i] == 'D':
            pass
        elif i % 2 == 0 and s[i] == 'R':
            pass
        elif i % 2 == 1 and s[i] == 'L':
            pass
        else:
            print('No')
            return
    print('Yes') def main():
    s = list(input())
    for i in range(len(s)):
        if s[i] == 'U' or s[i] == 'D':
            pass
        elif i % 2 == 0 and s[i] == 'R':
            pass
        elif i % 2 == 1 and s[i] == 'L':
            pass
        else:
            print('No')
            return
    print('Yes') main input = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() input
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    s = list(input())
    for i in range(len(s)):
        if s[i] == 'U' or s[i] == 'D':
            pass
        elif i % 2 == 0 and s[i] == 'R':
            pass
        elif i % 2 == 1 and s[i] == 'L':
            pass
        else:
            print('No')
            return
    print('Yes')

if __name__ == '__main__':
    main()