S=input()

if all(a!="L" for a in S[::2]) and all(a!="R" for a in S[1::2]):
    print("Yes")
else:
    print("No") S=input() S input() input if all(a!="L" for a in S[::2]) and all(a!="R" for a in S[1::2]):
    print("Yes")
else:
    print("No") all(a!="L" for a in S[::2]) and all(a!="R" for a in S[1::2]) all(a!="L" for a in S[::2]) all a!="L" a "L" all(a!="R" for a in S[1::2]) all a!="R" a "R" print("Yes") print "Yes" print("No") print "No" S=input() input() S
S=input()

if all(a!="L" for a in S[::2]) and all(a!="R" for a in S[1::2]):
    print("Yes")
else:
    print("No")
