s=input()
t=0
if any([i=="R" for i in s[1::2]]) or any([i=="L" for i in s[::2]]):
    t=1
print("YNeos"[t::2]) s=input() s input() input t=0 t 0 if any([i=="R" for i in s[1::2]]) or any([i=="L" for i in s[::2]]):
    t=1 any([i=="R" for i in s[1::2]]) or any([i=="L" for i in s[::2]]) any([i=="R" for i in s[1::2]]) any [i=="R" for i in s[1::2]] any([i=="L" for i in s[::2]]) any [i=="L" for i in s[::2]] t=1 t 1 print("YNeos"[t::2]) print "YNeos"[t::2] "YNeos" t::2 t 2 t=0 0 t s=input() input() s t=1 1 t
s=input()
t=0
if any([i=="R" for i in s[1::2]]) or any([i=="L" for i in s[::2]]):
    t=1
print("YNeos"[t::2])