s = input()
sl = list(s)
for i in range(len(sl)):
    if (i + 1) % 2 == 1:
        if sl[i] == 'L':
            print('No')
            break
        else:
            continue
    else:
        if sl[i] == 'R':
            print('No')
            break
        else:
            continue
else:
    print('Yes') s = input() s input() input sl = list(s) sl list(s) list s for i in range(len(sl)):
    if (i + 1) % 2 == 1:
        if sl[i] == 'L':
            print('No')
            break
        else:
            continue
    else:
        if sl[i] == 'R':
            print('No')
            break
        else:
            continue
else:
    print('Yes') i range(len(sl)) range len(sl) len sl if (i + 1) % 2 == 1:
        if sl[i] == 'L':
            print('No')
            break
        else:
            continue
    else:
        if sl[i] == 'R':
            print('No')
            break
        else:
            continue (i + 1) % 2 == 1 (i + 1) % 2 i + 1 i 1 2 1 if sl[i] == 'L':
            print('No')
            break
        else:
            continue
     sl[i] == 'L' sl[i] sl i 'L' print('No') print 'No' break continue if sl[i] == 'R':
            print('No')
            break
        else:
            continue sl[i] == 'R' sl[i] sl i 'R' print('No') print 'No' break continue print('Yes') print 'Yes' sl = list(s) list(s) sl s = input() input() s
s = input()
sl = list(s)
for i in range(len(sl)):
    if (i + 1) % 2 == 1:
        if sl[i] == 'L':
            print('No')
            break
        else:
            continue
    else:
        if sl[i] == 'R':
            print('No')
            break
        else:
            continue
else:
    print('Yes')