S = input()
odd = ['R', 'U', 'D']
even = ['L', 'U', 'D']
for x in range(len(S)):
    if (x+1) % 2 == 0:
        if not S[x] in even:
            print('No')
            break
    else:
        if not S[x] in odd:
            print('No')
            break
else:
    print('Yes') S = input() S input() input odd = ['R', 'U', 'D'] odd ['R', 'U', 'D'] 'R' 'U' 'D' even = ['L', 'U', 'D'] even ['L', 'U', 'D'] 'L' 'U' 'D' for x in range(len(S)):
    if (x+1) % 2 == 0:
        if not S[x] in even:
            print('No')
            break
    else:
        if not S[x] in odd:
            print('No')
            break
else:
    print('Yes') x range(len(S)) range len(S) len S if (x+1) % 2 == 0:
        if not S[x] in even:
            print('No')
            break
    else:
        if not S[x] in odd:
            print('No')
            break (x+1) % 2 == 0 (x+1) % 2 x+1 x 1 2 0 if not S[x] in even:
            print('No')
            break
     not S[x] in even S[x] in even S[x] S x even print('No') print 'No' break if not S[x] in odd:
            print('No')
            break not S[x] in odd S[x] in odd S[x] S x odd print('No') print 'No' break print('Yes') print 'Yes' even = ['L', 'U', 'D'] ['L', 'U', 'D'] even S = input() input() S odd = ['R', 'U', 'D'] ['R', 'U', 'D'] odd
S = input()
odd = ['R', 'U', 'D']
even = ['L', 'U', 'D']
for x in range(len(S)):
    if (x+1) % 2 == 0:
        if not S[x] in even:
            print('No')
            break
    else:
        if not S[x] in odd:
            print('No')
            break
else:
    print('Yes')