S = str(input())
check = 1
for i in range(len(S)):
    if i%2==0 and S[i]=='L':
        check = 0
        break
    elif i%2==1 and S[i]=='R':
        check = 0
        break
if check == 1:
    print('Yes')
else:
    print('No') S = str(input()) S str(input()) str input() input check = 1 check 1 for i in range(len(S)):
    if i%2==0 and S[i]=='L':
        check = 0
        break
    elif i%2==1 and S[i]=='R':
        check = 0
        break i range(len(S)) range len(S) len S if i%2==0 and S[i]=='L':
        check = 0
        break
    elif i%2==1 and S[i]=='R':
        check = 0
        break i%2==0 and S[i]=='L' i%2==0 i%2 i 2 0 S[i]=='L' S[i] S i 'L' check = 0 check 0 break elif i%2==1 and S[i]=='R':
        check = 0
        break i%2==1 and S[i]=='R' i%2==1 i%2 i 2 1 S[i]=='R' S[i] S i 'R' check = 0 check 0 break if check == 1:
    print('Yes')
else:
    print('No') check == 1 check 1 print('Yes') print 'Yes' print('No') print 'No' check = 1 1 check S = str(input()) str(input()) S check = 0 0 check check = 0 0 check
S = str(input())
check = 1
for i in range(len(S)):
    if i%2==0 and S[i]=='L':
        check = 0
        break
    elif i%2==1 and S[i]=='R':
        check = 0
        break
if check == 1:
    print('Yes')
else:
    print('No')