S = list(map(str,input()))

odd = ['R','U','D']
even = ['L','U','D']

for i in range(len(S)):
    if (i+1)%2 == 0:
        if S[i] in 'R':
            print('No')
            exit()
    elif (i+1)%2 == 1:
        if S[i] in 'L':
            print('No')
            exit()
print('Yes') S = list(map(str,input())) S list(map(str,input())) list map(str,input()) map str 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 i in range(len(S)):
    if (i+1)%2 == 0:
        if S[i] in 'R':
            print('No')
            exit()
    elif (i+1)%2 == 1:
        if S[i] in 'L':
            print('No')
            exit() i range(len(S)) range len(S) len S if (i+1)%2 == 0:
        if S[i] in 'R':
            print('No')
            exit()
    elif (i+1)%2 == 1:
        if S[i] in 'L':
            print('No')
            exit() (i+1)%2 == 0 (i+1)%2 i+1 i 1 2 0 if S[i] in 'R':
            print('No')
            exit()
     S[i] in 'R' S[i] S i 'R' print('No') print 'No' exit() exit elif (i+1)%2 == 1:
        if S[i] in 'L':
            print('No')
            exit() (i+1)%2 == 1 (i+1)%2 i+1 i 1 2 1 if S[i] in 'L':
            print('No')
            exit() S[i] in 'L' S[i] S i 'L' print('No') print 'No' exit() exit print('Yes') print 'Yes' S = list(map(str,input())) list(map(str,input())) S odd = ['R','U','D'] ['R','U','D'] odd even = ['L','U','D'] ['L','U','D'] even
S = list(map(str,input()))

odd = ['R','U','D']
even = ['L','U','D']

for i in range(len(S)):
    if (i+1)%2 == 0:
        if S[i] in 'R':
            print('No')
            exit()
    elif (i+1)%2 == 1:
        if S[i] in 'L':
            print('No')
            exit()
print('Yes')