S=input()

odd=['R','U','D']
even=['L','U','D']
flag=True
for i in range(len(S)):
    if (i+1)%2==0 and not(S[i] in even):
        flag=False
        print('No')
        break 
    elif (i+1)%2==1 and not(S[i] in odd):
        flag=False
        print('No')
        break

if flag:
    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' flag=True flag True for i in range(len(S)):
    if (i+1)%2==0 and not(S[i] in even):
        flag=False
        print('No')
        break 
    elif (i+1)%2==1 and not(S[i] in odd):
        flag=False
        print('No')
        break i range(len(S)) range len(S) len S if (i+1)%2==0 and not(S[i] in even):
        flag=False
        print('No')
        break 
    elif (i+1)%2==1 and not(S[i] in odd):
        flag=False
        print('No')
        break (i+1)%2==0 and not(S[i] in even) (i+1)%2==0 (i+1)%2 i+1 i 1 2 0 not(S[i] in even) S[i] in even S[i] S i even flag=False flag False print('No') print 'No' break elif (i+1)%2==1 and not(S[i] in odd):
        flag=False
        print('No')
        break (i+1)%2==1 and not(S[i] in odd) (i+1)%2==1 (i+1)%2 i+1 i 1 2 1 not(S[i] in odd) S[i] in odd S[i] S i odd flag=False flag False print('No') print 'No' break if flag:
    print('Yes') flag print('Yes') print 'Yes' flag=True True flag flag=False False flag S=input() input() S odd=['R','U','D'] ['R','U','D'] odd even=['L','U','D'] ['L','U','D'] even flag=False False flag
S=input()

odd=['R','U','D']
even=['L','U','D']
flag=True
for i in range(len(S)):
    if (i+1)%2==0 and not(S[i] in even):
        flag=False
        print('No')
        break 
    elif (i+1)%2==1 and not(S[i] in odd):
        flag=False
        print('No')
        break

if flag:
    print('Yes')
