s = input()

od = s[0 :: 2]
ev = s[1 :: 2]

if all(x != 'L' for x in od) and all(y != 'R' for y in ev):
  print('Yes')

else:
  print('No') s = input() s input() input od = s[0 :: 2] od s[0 :: 2] s 0 :: 2 0 2 ev = s[1 :: 2] ev s[1 :: 2] s 1 :: 2 1 2 if all(x != 'L' for x in od) and all(y != 'R' for y in ev):
  print('Yes')

else:
  print('No') all(x != 'L' for x in od) and all(y != 'R' for y in ev) all(x != 'L' for x in od) all x != 'L' x 'L' all(y != 'R' for y in ev) all y != 'R' y 'R' print('Yes') print 'Yes' print('No') print 'No' ev = s[1 :: 2] s[1 :: 2] ev od = s[0 :: 2] s[0 :: 2] od s = input() input() s
s = input()

od = s[0 :: 2]
ev = s[1 :: 2]

if all(x != 'L' for x in od) and all(y != 'R' for y in ev):
  print('Yes')

else:
  print('No')