S = input()
A = ['R', 'U', 'D']
B = ['L', 'U', 'D']
for i,j in enumerate(S):
    if((i+1)%2==0):
        if( j not in B):
            print('No')
            exit()
    else:
        if(j not in A):
            print('No')
            exit()
print('Yes') S = input() S input() input A = ['R', 'U', 'D'] A ['R', 'U', 'D'] 'R' 'U' 'D' B = ['L', 'U', 'D'] B ['L', 'U', 'D'] 'L' 'U' 'D' for i,j in enumerate(S):
    if((i+1)%2==0):
        if( j not in B):
            print('No')
            exit()
    else:
        if(j not in A):
            print('No')
            exit() i j enumerate(S) enumerate S if((i+1)%2==0):
        if( j not in B):
            print('No')
            exit()
    else:
        if(j not in A):
            print('No')
            exit() (i+1)%2==0 (i+1)%2 i+1 i 1 2 0 if( j not in B):
            print('No')
            exit()
     j not in B j B print('No') print 'No' exit() exit if(j not in A):
            print('No')
            exit() j not in A j A print('No') print 'No' exit() exit print('Yes') print 'Yes' A = ['R', 'U', 'D'] ['R', 'U', 'D'] A S = input() input() S B = ['L', 'U', 'D'] ['L', 'U', 'D'] B
S = input()
A = ['R', 'U', 'D']
B = ['L', 'U', 'D']
for i,j in enumerate(S):
    if((i+1)%2==0):
        if( j not in B):
            print('No')
            exit()
    else:
        if(j not in A):
            print('No')
            exit()
print('Yes')
