import sys

s = input()
for i in range(len(s)):
    if ((i+1) % 2 == 1):
        if (s[i] == 'L'):
            print("No")
            sys.exit()
    elif ((i+1) % 2 == 0):
        if (s[i] == 'R'):
            print("No")
            sys.exit()
print("Yes") import sys sys s = input() s input() input for i in range(len(s)):
    if ((i+1) % 2 == 1):
        if (s[i] == 'L'):
            print("No")
            sys.exit()
    elif ((i+1) % 2 == 0):
        if (s[i] == 'R'):
            print("No")
            sys.exit() i range(len(s)) range len(s) len s if ((i+1) % 2 == 1):
        if (s[i] == 'L'):
            print("No")
            sys.exit()
    elif ((i+1) % 2 == 0):
        if (s[i] == 'R'):
            print("No")
            sys.exit() (i+1) % 2 == 1 (i+1) % 2 i+1 i 1 2 1 if (s[i] == 'L'):
            print("No")
            sys.exit()
     s[i] == 'L' s[i] s i 'L' print("No") print "No" sys.exit() sys.exit sys exit elif ((i+1) % 2 == 0):
        if (s[i] == 'R'):
            print("No")
            sys.exit() (i+1) % 2 == 0 (i+1) % 2 i+1 i 1 2 0 if (s[i] == 'R'):
            print("No")
            sys.exit() s[i] == 'R' s[i] s i 'R' print("No") print "No" sys.exit() sys.exit sys exit print("Yes") print "Yes" s = input() input() s
import sys

s = input()
for i in range(len(s)):
    if ((i+1) % 2 == 1):
        if (s[i] == 'L'):
            print("No")
            sys.exit()
    elif ((i+1) % 2 == 0):
        if (s[i] == 'R'):
            print("No")
            sys.exit()
print("Yes")