S = input()

a = {'R', 'U', 'D'}
b = {'L', 'U', 'D'}
Odd = set(S[0::2])
Even = set(S[1::2])

if Even <= b and Odd <= a:
    print('Yes')
else:
    print('No') S = input() S input() input a = {'R', 'U', 'D'} a {'R', 'U', 'D'} b = {'L', 'U', 'D'} b {'L', 'U', 'D'} Odd = set(S[0::2]) Odd set(S[0::2]) set S[0::2] S 0::2 0 2 Even = set(S[1::2]) Even set(S[1::2]) set S[1::2] S 1::2 1 2 if Even <= b and Odd <= a:
    print('Yes')
else:
    print('No') Even <= b and Odd <= a Even <= b Even b Odd <= a Odd a print('Yes') print 'Yes' print('No') print 'No' Odd = set(S[0::2]) set(S[0::2]) Odd b = {'L', 'U', 'D'} {'L', 'U', 'D'} b Even = set(S[1::2]) set(S[1::2]) Even a = {'R', 'U', 'D'} {'R', 'U', 'D'} a S = input() input() S
S = input()

a = {'R', 'U', 'D'}
b = {'L', 'U', 'D'}
Odd = set(S[0::2])
Even = set(S[1::2])

if Even <= b and Odd <= a:
    print('Yes')
else:
    print('No')