s = input()

for i in range(1,len(s)+1,2):
    if s[i-1] == 'L':
        print('No')
        break
else:
    for i in range(2,len(s)+1,2):
        if s[i-1] == 'R':
            print('No')
            break
    else:
        print('Yes') s = input() s input() input for i in range(1,len(s)+1,2):
    if s[i-1] == 'L':
        print('No')
        break
else:
    for i in range(2,len(s)+1,2):
        if s[i-1] == 'R':
            print('No')
            break
    else:
        print('Yes') i range(1,len(s)+1,2) range 1 len(s)+1 len(s) len s 1 2 if s[i-1] == 'L':
        print('No')
        break s[i-1] == 'L' s[i-1] s i-1 i 1 'L' print('No') print 'No' break for i in range(2,len(s)+1,2):
        if s[i-1] == 'R':
            print('No')
            break
    else:
        print('Yes') i range(2,len(s)+1,2) range 2 len(s)+1 len(s) len s 1 2 if s[i-1] == 'R':
            print('No')
            break
     s[i-1] == 'R' s[i-1] s i-1 i 1 'R' print('No') print 'No' break print('Yes') print 'Yes' s = input() input() s
s = input()

for i in range(1,len(s)+1,2):
    if s[i-1] == 'L':
        print('No')
        break
else:
    for i in range(2,len(s)+1,2):
        if s[i-1] == 'R':
            print('No')
            break
    else:
        print('Yes')