N=str(input())
if 'L' in N[0::2] or 'R' in N[1::2]:
    print('No')
else:
    print('Yes') N=str(input()) N str(input()) str input() input if 'L' in N[0::2] or 'R' in N[1::2]:
    print('No')
else:
    print('Yes') 'L' in N[0::2] or 'R' in N[1::2] 'L' in N[0::2] 'L' N[0::2] N 0::2 0 2 'R' in N[1::2] 'R' N[1::2] N 1::2 1 2 print('No') print 'No' print('Yes') print 'Yes' N=str(input()) str(input()) N
N=str(input())
if 'L' in N[0::2] or 'R' in N[1::2]:
    print('No')
else:
    print('Yes')