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