def main():
    S = str(input())
    odd = (len(S) // 2) + (len(S) % 2)
    even = len(S) // 2
    check_odd = 0
    check_even = 0
    c = 0
    for i in range(odd):
        if S[c] == 'R' or S[c] == 'U' or S[c] == 'D':
            check_odd = check_odd + 1
        c = c + 2
    c = 1
    for i in range(even):
        if S[c] == 'L' or S[c] == 'U' or S[c] == 'D':
            check_even = check_even + 1
        c = c + 2
    if check_even == even and check_odd == odd:
        print('Yes')
    else:
        print('No')
main()   def main():
    S = str(input())
    odd = (len(S) // 2) + (len(S) % 2)
    even = len(S) // 2
    check_odd = 0
    check_even = 0
    c = 0
    for i in range(odd):
        if S[c] == 'R' or S[c] == 'U' or S[c] == 'D':
            check_odd = check_odd + 1
        c = c + 2
    c = 1
    for i in range(even):
        if S[c] == 'L' or S[c] == 'U' or S[c] == 'D':
            check_even = check_even + 1
        c = c + 2
    if check_even == even and check_odd == odd:
        print('Yes')
    else:
        print('No') main S = str(input()) S str(input()) str input() input odd = (len(S) // 2) + (len(S) % 2) odd (len(S) // 2) + (len(S) % 2) len(S) // 2 len(S) len S 2 len(S) % 2 len(S) len S 2 even = len(S) // 2 even len(S) // 2 len(S) len S 2 check_odd = 0 check_odd 0 check_even = 0 check_even 0 c = 0 c 0 for i in range(odd):
        if S[c] == 'R' or S[c] == 'U' or S[c] == 'D':
            check_odd = check_odd + 1
        c = c + 2
     i range(odd) range odd if S[c] == 'R' or S[c] == 'U' or S[c] == 'D':
            check_odd = check_odd + 1
         S[c] == 'R' or S[c] == 'U' or S[c] == 'D' S[c] == 'R' or S[c] == 'U' S[c] == 'R' S[c] S c 'R' S[c] == 'U' S[c] S c 'U' S[c] == 'D' S[c] S c 'D' check_odd = check_odd + 1 check_odd check_odd + 1 check_odd 1 c = c + 2 c c + 2 c 2 c = 1 c 1 for i in range(even):
        if S[c] == 'L' or S[c] == 'U' or S[c] == 'D':
            check_even = check_even + 1
        c = c + 2
     i range(even) range even if S[c] == 'L' or S[c] == 'U' or S[c] == 'D':
            check_even = check_even + 1
         S[c] == 'L' or S[c] == 'U' or S[c] == 'D' S[c] == 'L' or S[c] == 'U' S[c] == 'L' S[c] S c 'L' S[c] == 'U' S[c] S c 'U' S[c] == 'D' S[c] S c 'D' check_even = check_even + 1 check_even check_even + 1 check_even 1 c = c + 2 c c + 2 c 2 if check_even == even and check_odd == odd:
        print('Yes')
    else:
        print('No') check_even == even and check_odd == odd check_even == even check_even even check_odd == odd check_odd odd print('Yes') print 'Yes' print('No') print 'No' main() main def main():
    S = str(input())
    odd = (len(S) // 2) + (len(S) % 2)
    even = len(S) // 2
    check_odd = 0
    check_even = 0
    c = 0
    for i in range(odd):
        if S[c] == 'R' or S[c] == 'U' or S[c] == 'D':
            check_odd = check_odd + 1
        c = c + 2
    c = 1
    for i in range(even):
        if S[c] == 'L' or S[c] == 'U' or S[c] == 'D':
            check_even = check_even + 1
        c = c + 2
    if check_even == even and check_odd == odd:
        print('Yes')
    else:
        print('No') def main():
    S = str(input())
    odd = (len(S) // 2) + (len(S) % 2)
    even = len(S) // 2
    check_odd = 0
    check_even = 0
    c = 0
    for i in range(odd):
        if S[c] == 'R' or S[c] == 'U' or S[c] == 'D':
            check_odd = check_odd + 1
        c = c + 2
    c = 1
    for i in range(even):
        if S[c] == 'L' or S[c] == 'U' or S[c] == 'D':
            check_even = check_even + 1
        c = c + 2
    if check_even == even and check_odd == odd:
        print('Yes')
    else:
        print('No') main
def main():
    S = str(input())
    odd = (len(S) // 2) + (len(S) % 2)
    even = len(S) // 2
    check_odd = 0
    check_even = 0
    c = 0
    for i in range(odd):
        if S[c] == 'R' or S[c] == 'U' or S[c] == 'D':
            check_odd = check_odd + 1
        c = c + 2
    c = 1
    for i in range(even):
        if S[c] == 'L' or S[c] == 'U' or S[c] == 'D':
            check_even = check_even + 1
        c = c + 2
    if check_even == even and check_odd == odd:
        print('Yes')
    else:
        print('No')
main()  