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


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


if __name__ == '__main__':
    main()