S = input()
odds = []
evens = []
for i in range(len(S)):
    if i % 2 == 0:
        odds.append(S[i])
    else:
        evens.append(S[i])

if 'L' not in odds and 'R' not in evens:
    print('Yes')
else:
    print('No') S = input() S input() input odds = [] odds [] evens = [] evens [] for i in range(len(S)):
    if i % 2 == 0:
        odds.append(S[i])
    else:
        evens.append(S[i]) i range(len(S)) range len(S) len S if i % 2 == 0:
        odds.append(S[i])
    else:
        evens.append(S[i]) i % 2 == 0 i % 2 i 2 0 odds.append(S[i]) odds.append odds append S[i] S i evens.append(S[i]) evens.append evens append S[i] S i if 'L' not in odds and 'R' not in evens:
    print('Yes')
else:
    print('No') 'L' not in odds and 'R' not in evens 'L' not in odds 'L' odds 'R' not in evens 'R' evens print('Yes') print 'Yes' print('No') print 'No' S = input() input() S evens = [] [] evens odds = [] [] odds
S = input()
odds = []
evens = []
for i in range(len(S)):
    if i % 2 == 0:
        odds.append(S[i])
    else:
        evens.append(S[i])

if 'L' not in odds and 'R' not in evens:
    print('Yes')
else:
    print('No')