s = input()
odd = ["R","U","D"]
even = ["L","U","D"]

for i in range(len(s))[0::2]:
    if not s[i] in odd:
        print('No')
        exit(0)

for i in range(len(s))[1::2]:
    if not s[i] in even:
        print('No')
        exit(0)

print('Yes') s = input() s input() input odd = ["R","U","D"] odd ["R","U","D"] "R" "U" "D" even = ["L","U","D"] even ["L","U","D"] "L" "U" "D" for i in range(len(s))[0::2]:
    if not s[i] in odd:
        print('No')
        exit(0) i range(len(s))[0::2] (len(s)) range len(s) len s 0::2 0 2 if not s[i] in odd:
        print('No')
        exit(0) not s[i] in odd s[i] in odd s[i] s i odd print('No') print 'No' exit(0) exit 0 for i in range(len(s))[1::2]:
    if not s[i] in even:
        print('No')
        exit(0) i range(len(s))[1::2] (len(s)) range len(s) len s 1::2 1 2 if not s[i] in even:
        print('No')
        exit(0) not s[i] in even s[i] in even s[i] s i even print('No') print 'No' exit(0) exit 0 print('Yes') print 'Yes' s = input() input() s odd = ["R","U","D"] ["R","U","D"] odd even = ["L","U","D"] ["L","U","D"] even
s = input()
odd = ["R","U","D"]
even = ["L","U","D"]

for i in range(len(s))[0::2]:
    if not s[i] in odd:
        print('No')
        exit(0)

for i in range(len(s))[1::2]:
    if not s[i] in even:
        print('No')
        exit(0)

print('Yes')