# Written by Shagoto
s = input()
i = 0
check = True
while(i < len(s)):
    if(i % 2 == 0 and s[i] == "L"):
        check = False
        break
    elif(i % 2 == 1 and s[i] == "R"):
        check = False
        break
    i += 1

if(check):
    print("Yes")
else:
    print("No") s = input() s input() input i = 0 i 0 check = True check True while(i < len(s)):
    if(i % 2 == 0 and s[i] == "L"):
        check = False
        break
    elif(i % 2 == 1 and s[i] == "R"):
        check = False
        break
    i += 1 i < len(s) i len(s) len s if(i % 2 == 0 and s[i] == "L"):
        check = False
        break
    elif(i % 2 == 1 and s[i] == "R"):
        check = False
        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 = False check False break elif(i % 2 == 1 and s[i] == "R"):
        check = False
        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 = False check False break i += 1 i 1 if(check):
    print("Yes")
else:
    print("No") check print("Yes") print "Yes" print("No") print "No" s = input() input() s check = False False check check = True True check i = 0 0 i check = False False check i += 1 1 i
# Written by Shagoto
s = input()
i = 0
check = True
while(i < len(s)):
    if(i % 2 == 0 and s[i] == "L"):
        check = False
        break
    elif(i % 2 == 1 and s[i] == "R"):
        check = False
        break
    i += 1

if(check):
    print("Yes")
else:
    print("No")