S = input()
val = True
for i in range(1, len(S) + 1):
    if i % 2 and (S[i - 1] in ['R', 'U', 'D']):
        pass
    elif i % 2 == 0 and (S[i - 1] in ['L', 'U', 'D']):
        pass
    else:
        val = False
    if not val:
        print('No')
        break
else:
    print('Yes') S = input() S input() input val = True val True for i in range(1, len(S) + 1):
    if i % 2 and (S[i - 1] in ['R', 'U', 'D']):
        pass
    elif i % 2 == 0 and (S[i - 1] in ['L', 'U', 'D']):
        pass
    else:
        val = False
    if not val:
        print('No')
        break
else:
    print('Yes') i range(1, len(S) + 1) range 1 len(S) + 1 len(S) len S 1 if i % 2 and (S[i - 1] in ['R', 'U', 'D']):
        pass
    elif i % 2 == 0 and (S[i - 1] in ['L', 'U', 'D']):
        pass
    else:
        val = False
     i % 2 and (S[i - 1] in ['R', 'U', 'D']) i % 2 i 2 S[i - 1] in ['R', 'U', 'D'] S[i - 1] S i - 1 i 1 ['R', 'U', 'D'] 'R' 'U' 'D' elif i % 2 == 0 and (S[i - 1] in ['L', 'U', 'D']):
        pass
     i % 2 == 0 and (S[i - 1] in ['L', 'U', 'D']) i % 2 == 0 i % 2 i 2 0 S[i - 1] in ['L', 'U', 'D'] S[i - 1] S i - 1 i 1 ['L', 'U', 'D'] 'L' 'U' 'D' val = False val False if not val:
        print('No')
        break not val val print('No') print 'No' break print('Yes') print 'Yes' val = False False val val = True True val S = input() input() S
S = input()
val = True
for i in range(1, len(S) + 1):
    if i % 2 and (S[i - 1] in ['R', 'U', 'D']):
        pass
    elif i % 2 == 0 and (S[i - 1] in ['L', 'U', 'D']):
        pass
    else:
        val = False
    if not val:
        print('No')
        break
else:
    print('Yes')