import sys
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし


S = LS2()
N = len(S)
S1 = S[::2]
S2 = S[1::2]

r = sum(s in ['R','U','D'] for s in S1) + sum(s in ['L','U','D'] for s in S2)
print('Yes' if r == N else 'No') import sys sys def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし LS2 S = LS2() S LS2() LS2 N = len(S) N len(S) len S S1 = S[::2] S1 S[::2] S ::2 2 S2 = S[1::2] S2 S[1::2] S 1::2 1 2 r = sum(s in ['R','U','D'] for s in S1) + sum(s in ['L','U','D'] for s in S2) r sum(s in ['R','U','D'] for s in S1) + sum(s in ['L','U','D'] for s in S2) sum(s in ['R','U','D'] for s in S1) sum s in ['R','U','D'] s ['R','U','D'] 'R' 'U' 'D' sum(s in ['L','U','D'] for s in S2) sum s in ['L','U','D'] s ['L','U','D'] 'L' 'U' 'D' print('Yes' if r == N else 'No') print 'Yes' if r == N else 'No' r == N r N 'Yes' 'No' N = len(S) len(S) N S = LS2() LS2() S S2 = S[1::2] S[1::2] S2 def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし LS2 S1 = S[::2] S[::2] S1 r = sum(s in ['R','U','D'] for s in S1) + sum(s in ['L','U','D'] for s in S2) sum(s in ['R','U','D'] for s in S1) + sum(s in ['L','U','D'] for s in S2) r
import sys
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし


S = LS2()
N = len(S)
S1 = S[::2]
S2 = S[1::2]

r = sum(s in ['R','U','D'] for s in S1) + sum(s in ['L','U','D'] for s in S2)
print('Yes' if r == N else 'No')
