S=input()
for i,s in enumerate(S):
  if ((i+1)%2 == 1 and s=='L') or ((i+1)%2==0 and s=='R'):
    print('No')
    exit()
print('Yes') S=input() S input() input for i,s in enumerate(S):
  if ((i+1)%2 == 1 and s=='L') or ((i+1)%2==0 and s=='R'):
    print('No')
    exit() i s enumerate(S) enumerate S if ((i+1)%2 == 1 and s=='L') or ((i+1)%2==0 and s=='R'):
    print('No')
    exit() ((i+1)%2 == 1 and s=='L') or ((i+1)%2==0 and s=='R') (i+1)%2 == 1 and s=='L' (i+1)%2 == 1 (i+1)%2 i+1 i 1 2 1 s=='L' s 'L' (i+1)%2==0 and s=='R' (i+1)%2==0 (i+1)%2 i+1 i 1 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):
  if ((i+1)%2 == 1 and s=='L') or ((i+1)%2==0 and s=='R'):
    print('No')
    exit()
print('Yes')
