s = input()
ans = 0
for i in range(1,len(s)+1):
    if i%2 == 1:
        if s[i-1] == "R" or s[i-1] == "U" or s[i-1] == "D":
            ans += 1
        else:
            print('No')
            exit()
    elif i%2 == 0:
        if s[i-1] == 'L' or s[i-1] == "U" or s[i-1] == "D":
            ans += 1
        else:
            print('No')
            exit()
if ans == len(s):
    print('Yes')
else:
    print('No') s = input() s input() input ans = 0 ans 0 for i in range(1,len(s)+1):
    if i%2 == 1:
        if s[i-1] == "R" or s[i-1] == "U" or s[i-1] == "D":
            ans += 1
        else:
            print('No')
            exit()
    elif i%2 == 0:
        if s[i-1] == 'L' or s[i-1] == "U" or s[i-1] == "D":
            ans += 1
        else:
            print('No')
            exit() i range(1,len(s)+1) range 1 len(s)+1 len(s) len s 1 if i%2 == 1:
        if s[i-1] == "R" or s[i-1] == "U" or s[i-1] == "D":
            ans += 1
        else:
            print('No')
            exit()
    elif i%2 == 0:
        if s[i-1] == 'L' or s[i-1] == "U" or s[i-1] == "D":
            ans += 1
        else:
            print('No')
            exit() i%2 == 1 i%2 i 2 1 if s[i-1] == "R" or s[i-1] == "U" or s[i-1] == "D":
            ans += 1
        else:
            print('No')
            exit()
     s[i-1] == "R" or s[i-1] == "U" or s[i-1] == "D" s[i-1] == "R" or s[i-1] == "U" s[i-1] == "R" s[i-1] s i-1 i 1 "R" s[i-1] == "U" s[i-1] s i-1 i 1 "U" s[i-1] == "D" s[i-1] s i-1 i 1 "D" ans += 1 ans 1 print('No') print 'No' exit() exit elif i%2 == 0:
        if s[i-1] == 'L' or s[i-1] == "U" or s[i-1] == "D":
            ans += 1
        else:
            print('No')
            exit() i%2 == 0 i%2 i 2 0 if s[i-1] == 'L' or s[i-1] == "U" or s[i-1] == "D":
            ans += 1
        else:
            print('No')
            exit() s[i-1] == 'L' or s[i-1] == "U" or s[i-1] == "D" s[i-1] == 'L' or s[i-1] == "U" s[i-1] == 'L' s[i-1] s i-1 i 1 'L' s[i-1] == "U" s[i-1] s i-1 i 1 "U" s[i-1] == "D" s[i-1] s i-1 i 1 "D" ans += 1 ans 1 print('No') print 'No' exit() exit if ans == len(s):
    print('Yes')
else:
    print('No') ans == len(s) ans len(s) len s print('Yes') print 'Yes' print('No') print 'No' s = input() input() s ans += 1 1 ans ans = 0 0 ans ans += 1 1 ans
s = input()
ans = 0
for i in range(1,len(s)+1):
    if i%2 == 1:
        if s[i-1] == "R" or s[i-1] == "U" or s[i-1] == "D":
            ans += 1
        else:
            print('No')
            exit()
    elif i%2 == 0:
        if s[i-1] == 'L' or s[i-1] == "U" or s[i-1] == "D":
            ans += 1
        else:
            print('No')
            exit()
if ans == len(s):
    print('Yes')
else:
    print('No')