s = list(input())
flag = True
for i,j in enumerate(s):
    if i % 2 == 0:
        if j == "R" or j =="U" or j == "D":
            flag = True
        else:
            flag = False
            break
    else:
        if j == "L" or j == "U" or j == "D":
            flag = True
        else:
            flag = False
            break
if flag == True:
    print("Yes")
else:
    print("No") s = list(input()) s list(input()) list input() input flag = True flag True for i,j in enumerate(s):
    if i % 2 == 0:
        if j == "R" or j =="U" or j == "D":
            flag = True
        else:
            flag = False
            break
    else:
        if j == "L" or j == "U" or j == "D":
            flag = True
        else:
            flag = False
            break i j enumerate(s) enumerate s if i % 2 == 0:
        if j == "R" or j =="U" or j == "D":
            flag = True
        else:
            flag = False
            break
    else:
        if j == "L" or j == "U" or j == "D":
            flag = True
        else:
            flag = False
            break i % 2 == 0 i % 2 i 2 0 if j == "R" or j =="U" or j == "D":
            flag = True
        else:
            flag = False
            break
     j == "R" or j =="U" or j == "D" j == "R" or j =="U" j == "R" j "R" j =="U" j "U" j == "D" j "D" flag = True flag True flag = False flag False break if j == "L" or j == "U" or j == "D":
            flag = True
        else:
            flag = False
            break j == "L" or j == "U" or j == "D" j == "L" or j == "U" j == "L" j "L" j == "U" j "U" j == "D" j "D" flag = True flag True flag = False flag False break if flag == True:
    print("Yes")
else:
    print("No") flag == True flag True print("Yes") print "Yes" print("No") print "No" flag = False False flag flag = True True flag flag = True True flag flag = True True flag s = list(input()) list(input()) s flag = False False flag
s = list(input())
flag = True
for i,j in enumerate(s):
    if i % 2 == 0:
        if j == "R" or j =="U" or j == "D":
            flag = True
        else:
            flag = False
            break
    else:
        if j == "L" or j == "U" or j == "D":
            flag = True
        else:
            flag = False
            break
if flag == True:
    print("Yes")
else:
    print("No")