s = input().rstrip()
for i,l in enumerate(s):
    if i&1:
        if 'R' in l:
            print('No')
            break
    else:
        if 'L' in l:
            print('No')
            break
else:
    print('Yes') s = input().rstrip() s input().rstrip() ().rstrip () input rstrip for i,l in enumerate(s):
    if i&1:
        if 'R' in l:
            print('No')
            break
    else:
        if 'L' in l:
            print('No')
            break
else:
    print('Yes') i l enumerate(s) enumerate s if i&1:
        if 'R' in l:
            print('No')
            break
    else:
        if 'L' in l:
            print('No')
            break i&1 i 1 if 'R' in l:
            print('No')
            break
     'R' in l 'R' l print('No') print 'No' break if 'L' in l:
            print('No')
            break 'L' in l 'L' l print('No') print 'No' break print('Yes') print 'Yes' s = input().rstrip() input().rstrip() s
s = input().rstrip()
for i,l in enumerate(s):
    if i&1:
        if 'R' in l:
            print('No')
            break
    else:
        if 'L' in l:
            print('No')
            break
else:
    print('Yes')