S = input()

s_odd = S[::2]
s_even = S[1::2]


def is_valid_str(s_list, valid_strs):
    for s in s_list:
        if s not in valid_strs:
            return False

    return True


even_ok = is_valid_str(s_even, ["L", "U", "D"])
odd_ok = is_valid_str(s_odd, ["R", "U", "D"])

if even_ok and odd_ok:
    print("Yes")
else:
    print("No")
 S = input() S input() input s_odd = S[::2] s_odd S[::2] S ::2 2 s_even = S[1::2] s_even S[1::2] S 1::2 1 2 def is_valid_str(s_list, valid_strs):
    for s in s_list:
        if s not in valid_strs:
            return False

    return True is_valid_str for s in s_list:
        if s not in valid_strs:
            return False

     s s_list if s not in valid_strs:
            return False

     s not in valid_strs s valid_strs return False False return True True s_list s_list valid_strs valid_strs even_ok = is_valid_str(s_even, ["L", "U", "D"]) even_ok is_valid_str(s_even, ["L", "U", "D"]) is_valid_str s_even ["L", "U", "D"] "L" "U" "D" odd_ok = is_valid_str(s_odd, ["R", "U", "D"]) odd_ok is_valid_str(s_odd, ["R", "U", "D"]) is_valid_str s_odd ["R", "U", "D"] "R" "U" "D" if even_ok and odd_ok:
    print("Yes")
else:
    print("No") even_ok and odd_ok even_ok odd_ok print("Yes") print "Yes" print("No") print "No" s_odd = S[::2] S[::2] s_odd def is_valid_str(s_list, valid_strs):
    for s in s_list:
        if s not in valid_strs:
            return False

    return True def is_valid_str(s_list, valid_strs):
    for s in s_list:
        if s not in valid_strs:
            return False

    return True is_valid_str s_even = S[1::2] S[1::2] s_even odd_ok = is_valid_str(s_odd, ["R", "U", "D"]) is_valid_str(s_odd, ["R", "U", "D"]) odd_ok even_ok = is_valid_str(s_even, ["L", "U", "D"]) is_valid_str(s_even, ["L", "U", "D"]) even_ok S = input() input() S
S = input()

s_odd = S[::2]
s_even = S[1::2]


def is_valid_str(s_list, valid_strs):
    for s in s_list:
        if s not in valid_strs:
            return False

    return True


even_ok = is_valid_str(s_even, ["L", "U", "D"])
odd_ok = is_valid_str(s_odd, ["R", "U", "D"])

if even_ok and odd_ok:
    print("Yes")
else:
    print("No")

