s = input()
n = len(s)
flg = True
for i in range(n):
  if i % 2 == 0 and s[i] == 'L':
    flg = False
    break
  elif i % 2 == 1 and s[i] == 'R':
    flg = False
    break

if flg:
  print('Yes')
else:
  print('No') s = input() s input() input n = len(s) n len(s) len s flg = True flg True for i in range(n):
  if i % 2 == 0 and s[i] == 'L':
    flg = False
    break
  elif i % 2 == 1 and s[i] == 'R':
    flg = False
    break i range(n) range n if i % 2 == 0 and s[i] == 'L':
    flg = False
    break
  elif i % 2 == 1 and s[i] == 'R':
    flg = False
    break i % 2 == 0 and s[i] == 'L' i % 2 == 0 i % 2 i 2 0 s[i] == 'L' s[i] s i 'L' flg = False flg False break elif i % 2 == 1 and s[i] == 'R':
    flg = False
    break i % 2 == 1 and s[i] == 'R' i % 2 == 1 i % 2 i 2 1 s[i] == 'R' s[i] s i 'R' flg = False flg False break if flg:
  print('Yes')
else:
  print('No') flg print('Yes') print 'Yes' print('No') print 'No' s = input() input() s n = len(s) len(s) n flg = True True flg flg = False False flg flg = False False flg
s = input()
n = len(s)
flg = True
for i in range(n):
  if i % 2 == 0 and s[i] == 'L':
    flg = False
    break
  elif i % 2 == 1 and s[i] == 'R':
    flg = False
    break

if flg:
  print('Yes')
else:
  print('No')