N = str(input())
a = ['R','U','D']
b = ['L','U','D']
c = 0
for i in range(0, len(N)):
    if i % 2 == 0:
        if N[i] in a:
            c += 1

    else:
        if N[i] in b:
            c += 1


if c == len(N):
    print('Yes')
else:
    print('No') N = str(input()) N str(input()) str input() input a = ['R','U','D'] a ['R','U','D'] 'R' 'U' 'D' b = ['L','U','D'] b ['L','U','D'] 'L' 'U' 'D' c = 0 c 0 for i in range(0, len(N)):
    if i % 2 == 0:
        if N[i] in a:
            c += 1

    else:
        if N[i] in b:
            c += 1 i range(0, len(N)) range 0 len(N) len N if i % 2 == 0:
        if N[i] in a:
            c += 1

    else:
        if N[i] in b:
            c += 1 i % 2 == 0 i % 2 i 2 0 if N[i] in a:
            c += 1

     N[i] in a N[i] N i a c += 1 c 1 if N[i] in b:
            c += 1 N[i] in b N[i] N i b c += 1 c 1 if c == len(N):
    print('Yes')
else:
    print('No') c == len(N) c len(N) len N print('Yes') print 'Yes' print('No') print 'No' c += 1 1 c b = ['L','U','D'] ['L','U','D'] b N = str(input()) str(input()) N c += 1 1 c a = ['R','U','D'] ['R','U','D'] a c = 0 0 c
N = str(input())
a = ['R','U','D']
b = ['L','U','D']
c = 0
for i in range(0, len(N)):
    if i % 2 == 0:
        if N[i] in a:
            c += 1

    else:
        if N[i] in b:
            c += 1


if c == len(N):
    print('Yes')
else:
    print('No')