s = input()
even, odd = [], []
for i in range(len(s)):
    if i%2:
        odd.append(s[i])
    else:
        even.append(s[i])
e = list(set(odd))
o = list(set(even))
if('L' in o or 'R' in e):
    print('No')
else:
    print('Yes') s = input() s input() input even, odd = [], [] even [] odd [] for i in range(len(s)):
    if i%2:
        odd.append(s[i])
    else:
        even.append(s[i]) i range(len(s)) range len(s) len s if i%2:
        odd.append(s[i])
    else:
        even.append(s[i]) i%2 i 2 odd.append(s[i]) odd.append odd append s[i] s i even.append(s[i]) even.append even append s[i] s i e = list(set(odd)) e list(set(odd)) list set(odd) set odd o = list(set(even)) o list(set(even)) list set(even) set even if('L' in o or 'R' in e):
    print('No')
else:
    print('Yes') 'L' in o or 'R' in e 'L' in o 'L' o 'R' in e 'R' e print('No') print 'No' print('Yes') print 'Yes' odd = [], [] [] odd s = input() input() s e = list(set(odd)) list(set(odd)) e even, odd = [], [] [] even o = list(set(even)) list(set(even)) o
s = input()
even, odd = [], []
for i in range(len(s)):
    if i%2:
        odd.append(s[i])
    else:
        even.append(s[i])
e = list(set(odd))
o = list(set(even))
if('L' in o or 'R' in e):
    print('No')
else:
    print('Yes')