S = input()
point = 0

if len(S)%2 == 0:
    for i in range(0,len(S),2):
        if S[i] in 'RUD' and S[i+1] in 'LUD':
            point += 2

if len(S)%2 == 1:
    if S[0] in 'RUD':
        point += 1
    for i in range(1,len(S),2):
        if S[i+1] in 'RUD' and S[i] in 'LUD':
            point += 2

if point == len(S):
    print('Yes')
else:
    print('No') S = input() S input() input point = 0 point 0 if len(S)%2 == 0:
    for i in range(0,len(S),2):
        if S[i] in 'RUD' and S[i+1] in 'LUD':
            point += 2 len(S)%2 == 0 len(S)%2 len(S) len S 2 0 for i in range(0,len(S),2):
        if S[i] in 'RUD' and S[i+1] in 'LUD':
            point += 2 i range(0,len(S),2) range 0 len(S) len S 2 if S[i] in 'RUD' and S[i+1] in 'LUD':
            point += 2 S[i] in 'RUD' and S[i+1] in 'LUD' S[i] in 'RUD' S[i] S i 'RUD' S[i+1] in 'LUD' S[i+1] S i+1 i 1 'LUD' point += 2 point 2 if len(S)%2 == 1:
    if S[0] in 'RUD':
        point += 1
    for i in range(1,len(S),2):
        if S[i+1] in 'RUD' and S[i] in 'LUD':
            point += 2 len(S)%2 == 1 len(S)%2 len(S) len S 2 1 if S[0] in 'RUD':
        point += 1
     S[0] in 'RUD' S[0] S 0 'RUD' point += 1 point 1 for i in range(1,len(S),2):
        if S[i+1] in 'RUD' and S[i] in 'LUD':
            point += 2 i range(1,len(S),2) range 1 len(S) len S 2 if S[i+1] in 'RUD' and S[i] in 'LUD':
            point += 2 S[i+1] in 'RUD' and S[i] in 'LUD' S[i+1] in 'RUD' S[i+1] S i+1 i 1 'RUD' S[i] in 'LUD' S[i] S i 'LUD' point += 2 point 2 if point == len(S):
    print('Yes')
else:
    print('No') point == len(S) point len(S) len S print('Yes') print 'Yes' print('No') print 'No' S = input() input() S point += 1 1 point point = 0 0 point point += 2 2 point point += 2 2 point
S = input()
point = 0

if len(S)%2 == 0:
    for i in range(0,len(S),2):
        if S[i] in 'RUD' and S[i+1] in 'LUD':
            point += 2

if len(S)%2 == 1:
    if S[0] in 'RUD':
        point += 1
    for i in range(1,len(S),2):
        if S[i+1] in 'RUD' and S[i] in 'LUD':
            point += 2

if point == len(S):
    print('Yes')
else:
    print('No')
