a = ['R','U','D']
b = ['L','U','D']
s = input()
flag = True
for i in range(len(s)):
    if (i+1) % 2 == 0:
        if s[i] not in b:
            flag = False
    else:
        if s[i] not in a:
            flag = False

if flag:
    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 flag = True flag True for i in range(len(s)):
    if (i+1) % 2 == 0:
        if s[i] not in b:
            flag = False
    else:
        if s[i] not in a:
            flag = False i range(len(s)) range len(s) len s if (i+1) % 2 == 0:
        if s[i] not in b:
            flag = False
    else:
        if s[i] not in a:
            flag = False (i+1) % 2 == 0 (i+1) % 2 i+1 i 1 2 0 if s[i] not in b:
            flag = False
     s[i] not in b s[i] s i b flag = False flag False if s[i] not in a:
            flag = False s[i] not in a s[i] s i a flag = False flag False if flag:
    print('Yes')
else:
    print('No') flag print('Yes') print 'Yes' print('No') print 'No' flag = True True flag flag = False False flag b = ['L','U','D'] ['L','U','D'] b s = input() input() s a = ['R','U','D'] ['R','U','D'] a flag = False False flag
a = ['R','U','D']
b = ['L','U','D']
s = input()
flag = True
for i in range(len(s)):
    if (i+1) % 2 == 0:
        if s[i] not in b:
            flag = False
    else:
        if s[i] not in a:
            flag = False

if flag:
    print('Yes')
else:
    print('No')