def main():
    S = input()
    odd_list=['R', 'U', 'D']
    eve_list=['L', 'U', 'D']
    odd = S[0::2]
    eve = S[1::2]
    for i in odd:
        if i not in odd_list:
            print('No')
            return
    for i in eve:
        if i not in eve_list:
            print('No')
            return
    print('Yes')

main() def main():
    S = input()
    odd_list=['R', 'U', 'D']
    eve_list=['L', 'U', 'D']
    odd = S[0::2]
    eve = S[1::2]
    for i in odd:
        if i not in odd_list:
            print('No')
            return
    for i in eve:
        if i not in eve_list:
            print('No')
            return
    print('Yes') main S = input() S input() input odd_list=['R', 'U', 'D'] odd_list ['R', 'U', 'D'] 'R' 'U' 'D' eve_list=['L', 'U', 'D'] eve_list ['L', 'U', 'D'] 'L' 'U' 'D' odd = S[0::2] odd S[0::2] S 0::2 0 2 eve = S[1::2] eve S[1::2] S 1::2 1 2 for i in odd:
        if i not in odd_list:
            print('No')
            return
     i odd if i not in odd_list:
            print('No')
            return
     i not in odd_list i odd_list print('No') print 'No' return for i in eve:
        if i not in eve_list:
            print('No')
            return
     i eve if i not in eve_list:
            print('No')
            return
     i not in eve_list i eve_list print('No') print 'No' return print('Yes') print 'Yes' main() main def main():
    S = input()
    odd_list=['R', 'U', 'D']
    eve_list=['L', 'U', 'D']
    odd = S[0::2]
    eve = S[1::2]
    for i in odd:
        if i not in odd_list:
            print('No')
            return
    for i in eve:
        if i not in eve_list:
            print('No')
            return
    print('Yes') def main():
    S = input()
    odd_list=['R', 'U', 'D']
    eve_list=['L', 'U', 'D']
    odd = S[0::2]
    eve = S[1::2]
    for i in odd:
        if i not in odd_list:
            print('No')
            return
    for i in eve:
        if i not in eve_list:
            print('No')
            return
    print('Yes') main
def main():
    S = input()
    odd_list=['R', 'U', 'D']
    eve_list=['L', 'U', 'D']
    odd = S[0::2]
    eve = S[1::2]
    for i in odd:
        if i not in odd_list:
            print('No')
            return
    for i in eve:
        if i not in eve_list:
            print('No')
            return
    print('Yes')

main()
