S = input()
ok = True
for i in range(len(S)):
    if i % 2 == 0:
        if S[i] == 'L':
            ok = False
            break
    else:
        if S[i] == 'R':
            ok = False
            break
if ok:
    print("Yes")
else:
    print("No") S = input() S input() input ok = True ok True for i in range(len(S)):
    if i % 2 == 0:
        if S[i] == 'L':
            ok = False
            break
    else:
        if S[i] == 'R':
            ok = False
            break i range(len(S)) range len(S) len S if i % 2 == 0:
        if S[i] == 'L':
            ok = False
            break
    else:
        if S[i] == 'R':
            ok = False
            break i % 2 == 0 i % 2 i 2 0 if S[i] == 'L':
            ok = False
            break
     S[i] == 'L' S[i] S i 'L' ok = False ok False break if S[i] == 'R':
            ok = False
            break S[i] == 'R' S[i] S i '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 in range(len(S)):
    if i % 2 == 0:
        if S[i] == 'L':
            ok = False
            break
    else:
        if S[i] == 'R':
            ok = False
            break
if ok:
    print("Yes")
else:
    print("No")