def main():
    S = input().rstrip()
    for idx, s in enumerate(S, start=1):
        if idx % 2 == 1 and s not in ["R", "U", "D"]:
            print("No")
            exit()
        elif idx % 2 == 0 and s not in ["L", "U", "D"]:
            print("No")
            exit()
    print("Yes")


if __name__ == '__main__':
    main() def main():
    S = input().rstrip()
    for idx, s in enumerate(S, start=1):
        if idx % 2 == 1 and s not in ["R", "U", "D"]:
            print("No")
            exit()
        elif idx % 2 == 0 and s not in ["L", "U", "D"]:
            print("No")
            exit()
    print("Yes") main S = input().rstrip() S input().rstrip() ().rstrip () input rstrip for idx, s in enumerate(S, start=1):
        if idx % 2 == 1 and s not in ["R", "U", "D"]:
            print("No")
            exit()
        elif idx % 2 == 0 and s not in ["L", "U", "D"]:
            print("No")
            exit()
     idx s enumerate(S, start=1) enumerate S start=1 start 1 if idx % 2 == 1 and s not in ["R", "U", "D"]:
            print("No")
            exit()
        elif idx % 2 == 0 and s not in ["L", "U", "D"]:
            print("No")
            exit()
     idx % 2 == 1 and s not in ["R", "U", "D"] idx % 2 == 1 idx % 2 idx 2 1 s not in ["R", "U", "D"] s ["R", "U", "D"] "R" "U" "D" print("No") print "No" exit() exit elif idx % 2 == 0 and s not in ["L", "U", "D"]:
            print("No")
            exit()
     idx % 2 == 0 and s not in ["L", "U", "D"] idx % 2 == 0 idx % 2 idx 2 0 s not in ["L", "U", "D"] s ["L", "U", "D"] "L" "U" "D" print("No") print "No" exit() exit print("Yes") print "Yes" if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    S = input().rstrip()
    for idx, s in enumerate(S, start=1):
        if idx % 2 == 1 and s not in ["R", "U", "D"]:
            print("No")
            exit()
        elif idx % 2 == 0 and s not in ["L", "U", "D"]:
            print("No")
            exit()
    print("Yes") def main():
    S = input().rstrip()
    for idx, s in enumerate(S, start=1):
        if idx % 2 == 1 and s not in ["R", "U", "D"]:
            print("No")
            exit()
        elif idx % 2 == 0 and s not in ["L", "U", "D"]:
            print("No")
            exit()
    print("Yes") main
def main():
    S = input().rstrip()
    for idx, s in enumerate(S, start=1):
        if idx % 2 == 1 and s not in ["R", "U", "D"]:
            print("No")
            exit()
        elif idx % 2 == 0 and s not in ["L", "U", "D"]:
            print("No")
            exit()
    print("Yes")


if __name__ == '__main__':
    main()
