S = input()
for i, s in enumerate(S, 1):
    if (i%2==1 and s=='L') or (i%2==0 and s=='R'):
        print('No')
        exit()
print('Yes') S = input() S input() input for i, s in enumerate(S, 1):
    if (i%2==1 and s=='L') or (i%2==0 and s=='R'):
        print('No')
        exit() i s enumerate(S, 1) enumerate S 1 if (i%2==1 and s=='L') or (i%2==0 and s=='R'):
        print('No')
        exit() (i%2==1 and s=='L') or (i%2==0 and s=='R') i%2==1 and s=='L' i%2==1 i%2 i 2 1 s=='L' s 'L' i%2==0 and s=='R' i%2==0 i%2 i 2 0 s=='R' s 'R' print('No') print 'No' exit() exit print('Yes') print 'Yes' S = input() input() S
S = input()
for i, s in enumerate(S, 1):
    if (i%2==1 and s=='L') or (i%2==0 and s=='R'):
        print('No')
        exit()
print('Yes')