S = input()

for i, ch in enumerate(S):
    if i % 2 == 0 and ch == 'L':
        print("No")
        exit()
    elif i % 2 == 1 and ch == 'R':
        print('No')
        exit()    
print("Yes") S = input() S input() input for i, ch in enumerate(S):
    if i % 2 == 0 and ch == 'L':
        print("No")
        exit()
    elif i % 2 == 1 and ch == 'R':
        print('No')
        exit()     i ch enumerate(S) enumerate S if i % 2 == 0 and ch == 'L':
        print("No")
        exit()
    elif i % 2 == 1 and ch == 'R':
        print('No')
        exit()     i % 2 == 0 and ch == 'L' i % 2 == 0 i % 2 i 2 0 ch == 'L' ch 'L' print("No") print "No" exit() exit elif i % 2 == 1 and ch == 'R':
        print('No')
        exit()     i % 2 == 1 and ch == 'R' i % 2 == 1 i % 2 i 2 1 ch == 'R' ch 'R' print('No') print 'No' exit() exit print("Yes") print "Yes" S = input() input() S
S = input()

for i, ch in enumerate(S):
    if i % 2 == 0 and ch == 'L':
        print("No")
        exit()
    elif i % 2 == 1 and ch == 'R':
        print('No')
        exit()    
print("Yes")
