def main():
    s = input()
    flag = True

    for i in range(len(s)):
        if i % 2 == 0:  # 奇数文字目
            if s[i] not in ["R", "U", "D"]:
                flag = False
                break
        else:  # 偶数文字目
            if s[i] not in ["L", "U", "D"]:
                flag = False
                break

    if flag:
        ans = "Yes"
    else:
        ans = "No"

    print(ans)


if __name__ == "__main__":
    main() def main():
    s = input()
    flag = True

    for i in range(len(s)):
        if i % 2 == 0:  # 奇数文字目
            if s[i] not in ["R", "U", "D"]:
                flag = False
                break
        else:  # 偶数文字目
            if s[i] not in ["L", "U", "D"]:
                flag = False
                break

    if flag:
        ans = "Yes"
    else:
        ans = "No"

    print(ans) main s = input() s input() input flag = True flag True for i in range(len(s)):
        if i % 2 == 0:  # 奇数文字目
            if s[i] not in ["R", "U", "D"]:
                flag = False
                break
        else:  # 偶数文字目
            if s[i] not in ["L", "U", "D"]:
                flag = False
                break

     i range(len(s)) range len(s) len s if i % 2 == 0:  # 奇数文字目
            if s[i] not in ["R", "U", "D"]:
                flag = False
                break
        else:  # 偶数文字目
            if s[i] not in ["L", "U", "D"]:
                flag = False
                break

     i % 2 == 0 i % 2 i 2 0 if s[i] not in ["R", "U", "D"]:
                flag = False
                break
         s[i] not in ["R", "U", "D"] s[i] s i ["R", "U", "D"] "R" "U" "D" flag = False flag False break if s[i] not in ["L", "U", "D"]:
                flag = False
                break

     s[i] not in ["L", "U", "D"] s[i] s i ["L", "U", "D"] "L" "U" "D" flag = False flag False break if flag:
        ans = "Yes"
    else:
        ans = "No"

     flag ans = "Yes" ans "Yes" ans = "No" ans "No" print(ans) print ans if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    s = input()
    flag = True

    for i in range(len(s)):
        if i % 2 == 0:  # 奇数文字目
            if s[i] not in ["R", "U", "D"]:
                flag = False
                break
        else:  # 偶数文字目
            if s[i] not in ["L", "U", "D"]:
                flag = False
                break

    if flag:
        ans = "Yes"
    else:
        ans = "No"

    print(ans) def main():
    s = input()
    flag = True

    for i in range(len(s)):
        if i % 2 == 0:  # 奇数文字目
            if s[i] not in ["R", "U", "D"]:
                flag = False
                break
        else:  # 偶数文字目
            if s[i] not in ["L", "U", "D"]:
                flag = False
                break

    if flag:
        ans = "Yes"
    else:
        ans = "No"

    print(ans) main
def main():
    s = input()
    flag = True

    for i in range(len(s)):
        if i % 2 == 0:  # 奇数文字目
            if s[i] not in ["R", "U", "D"]:
                flag = False
                break
        else:  # 偶数文字目
            if s[i] not in ["L", "U", "D"]:
                flag = False
                break

    if flag:
        ans = "Yes"
    else:
        ans = "No"

    print(ans)


if __name__ == "__main__":
    main()
