
s=str(input())

a=0
b=0

for i in range(len(s)):
    if i%2 == 0:
        if "L" in s[i]:
            a+=1

for i in range(len(s)):
    if i%2 != 0:
        if "R" in s[i]:
            b+=1


if a>0 or b>0:
    print("No")
else:
    print("Yes")
 s=str(input()) s str(input()) str input() input a=0 a 0 b=0 b 0 for i in range(len(s)):
    if i%2 == 0:
        if "L" in s[i]:
            a+=1 i range(len(s)) range len(s) len s if i%2 == 0:
        if "L" in s[i]:
            a+=1 i%2 == 0 i%2 i 2 0 if "L" in s[i]:
            a+=1 "L" in s[i] "L" s[i] s i a+=1 a 1 for i in range(len(s)):
    if i%2 != 0:
        if "R" in s[i]:
            b+=1 i range(len(s)) range len(s) len s if i%2 != 0:
        if "R" in s[i]:
            b+=1 i%2 != 0 i%2 i 2 0 if "R" in s[i]:
            b+=1 "R" in s[i] "R" s[i] s i b+=1 b 1 if a>0 or b>0:
    print("No")
else:
    print("Yes") a>0 or b>0 a>0 a 0 b>0 b 0 print("No") print "No" print("Yes") print "Yes" s=str(input()) str(input()) s a=0 0 a b=0 0 b a+=1 1 a b+=1 1 b

s=str(input())

a=0
b=0

for i in range(len(s)):
    if i%2 == 0:
        if "L" in s[i]:
            a+=1

for i in range(len(s)):
    if i%2 != 0:
        if "R" in s[i]:
            b+=1


if a>0 or b>0:
    print("No")
else:
    print("Yes")

