S = input()
ok = True
for i, s in enumerate(S):
  if not i % 2 and s == 'L':
    ok = False
    break
  if i % 2 and s == 'R':
    ok = False
    break
if ok:
  print('Yes')
else:
  print('No') S = input() S input() input ok = True ok True for i, s in enumerate(S):
  if not i % 2 and s == 'L':
    ok = False
    break
  if i % 2 and s == 'R':
    ok = False
    break i s enumerate(S) enumerate S if not i % 2 and s == 'L':
    ok = False
    break
   not i % 2 and s == 'L' not i % 2 i % 2 i 2 s == 'L' s 'L' ok = False ok False break if i % 2 and s == 'R':
    ok = False
    break i % 2 and s == 'R' i % 2 i 2 s == 'R' s 'R' ok = False ok False break if ok:
  print('Yes')
else:
  print('No') ok print('Yes') print 'Yes' print('No') print 'No' ok = False False ok ok = True True ok ok = False False ok S = input() input() S
S = input()
ok = True
for i, s in enumerate(S):
  if not i % 2 and s == 'L':
    ok = False
    break
  if i % 2 and s == 'R':
    ok = False
    break
if ok:
  print('Yes')
else:
  print('No')