a = ["R","U","D"]
b = ["L","U","D"]
s = input()
cnt = 0
for i in range(len(s)):
    if i%2==0:
        if s[i] in a:
            pass
        else:
            cnt = 1
            break
    else:
        if s[i] in b:
            pass
        else:
            cnt = 1
            break
if cnt == 0:
    print("Yes")
else:
    print("No") a = ["R","U","D"] a ["R","U","D"] "R" "U" "D" b = ["L","U","D"] b ["L","U","D"] "L" "U" "D" s = input() s input() input cnt = 0 cnt 0 for i in range(len(s)):
    if i%2==0:
        if s[i] in a:
            pass
        else:
            cnt = 1
            break
    else:
        if s[i] in b:
            pass
        else:
            cnt = 1
            break i range(len(s)) range len(s) len s if i%2==0:
        if s[i] in a:
            pass
        else:
            cnt = 1
            break
    else:
        if s[i] in b:
            pass
        else:
            cnt = 1
            break i%2==0 i%2 i 2 0 if s[i] in a:
            pass
        else:
            cnt = 1
            break
     s[i] in a s[i] s i a cnt = 1 cnt 1 break if s[i] in b:
            pass
        else:
            cnt = 1
            break s[i] in b s[i] s i b cnt = 1 cnt 1 break if cnt == 0:
    print("Yes")
else:
    print("No") cnt == 0 cnt 0 print("Yes") print "Yes" print("No") print "No" cnt = 0 0 cnt cnt = 1 1 cnt cnt = 1 1 cnt s = input() input() s a = ["R","U","D"] ["R","U","D"] a b = ["L","U","D"] ["L","U","D"] b
a = ["R","U","D"]
b = ["L","U","D"]
s = input()
cnt = 0
for i in range(len(s)):
    if i%2==0:
        if s[i] in a:
            pass
        else:
            cnt = 1
            break
    else:
        if s[i] in b:
            pass
        else:
            cnt = 1
            break
if cnt == 0:
    print("Yes")
else:
    print("No")