import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

S = list(input())
odd = set(['R', 'U', 'D'])
even = set(['L', 'U', 'D'])

leng = len(S)
for i in range(leng):
    if i%2==1:
        if not S[i] in even:
            print('No')
            break
    else:
        if not S[i] in odd:
            print('No')
            break
else:
    print('Yes') import sys sys def input(): return sys.stdin.readline().strip() input def mapint(): return map(int, input().split()) mapint sys.setrecursionlimit(10**9) sys.setrecursionlimit sys setrecursionlimit 10**9 10 9 S = list(input()) S list(input()) list input() input odd = set(['R', 'U', 'D']) odd set(['R', 'U', 'D']) set ['R', 'U', 'D'] 'R' 'U' 'D' even = set(['L', 'U', 'D']) even set(['L', 'U', 'D']) set ['L', 'U', 'D'] 'L' 'U' 'D' leng = len(S) leng len(S) len S for i in range(leng):
    if i%2==1:
        if not S[i] in even:
            print('No')
            break
    else:
        if not S[i] in odd:
            print('No')
            break
else:
    print('Yes') i range(leng) range leng if i%2==1:
        if not S[i] in even:
            print('No')
            break
    else:
        if not S[i] in odd:
            print('No')
            break i%2==1 i%2 i 2 1 if not S[i] in even:
            print('No')
            break
     not S[i] in even S[i] in even S[i] S i even print('No') print 'No' break if not S[i] in odd:
            print('No')
            break not S[i] in odd S[i] in odd S[i] S i odd print('No') print 'No' break print('Yes') print 'Yes' S = list(input()) list(input()) S odd = set(['R', 'U', 'D']) set(['R', 'U', 'D']) odd leng = len(S) len(S) leng def mapint(): return map(int, input().split()) def mapint(): return map(int, input().split()) mapint def input(): return sys.stdin.readline().strip() def input(): return sys.stdin.readline().strip() input even = set(['L', 'U', 'D']) set(['L', 'U', 'D']) even
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

S = list(input())
odd = set(['R', 'U', 'D'])
even = set(['L', 'U', 'D'])

leng = len(S)
for i in range(leng):
    if i%2==1:
        if not S[i] in even:
            print('No')
            break
    else:
        if not S[i] in odd:
            print('No')
            break
else:
    print('Yes')