s=input()

cnt=0

for i in range(0,len(s),2):
  if s[i]=='L':
    cnt+=1

for i in range(1,len(s),2):
  if s[i]=='R':
    cnt+=1

if cnt==0:
  print('Yes')
else:
  print('No') s=input() s input() input cnt=0 cnt 0 for i in range(0,len(s),2):
  if s[i]=='L':
    cnt+=1 i range(0,len(s),2) range 0 len(s) len s 2 if s[i]=='L':
    cnt+=1 s[i]=='L' s[i] s i 'L' cnt+=1 cnt 1 for i in range(1,len(s),2):
  if s[i]=='R':
    cnt+=1 i range(1,len(s),2) range 1 len(s) len s 2 if s[i]=='R':
    cnt+=1 s[i]=='R' s[i] s i 'R' cnt+=1 cnt 1 if cnt==0:
  print('Yes')
else:
  print('No') cnt==0 cnt 0 print('Yes') print 'Yes' print('No') print 'No' s=input() input() s cnt+=1 1 cnt cnt+=1 1 cnt cnt=0 0 cnt
s=input()

cnt=0

for i in range(0,len(s),2):
  if s[i]=='L':
    cnt+=1

for i in range(1,len(s),2):
  if s[i]=='R':
    cnt+=1

if cnt==0:
  print('Yes')
else:
  print('No')