import sys
S = list(input())
S_odd = S[::2]
S_even = S[1::2]
easy_odd = ['R','U','D']
easy_even = ['L','U','D']

print('Yes') if set(S_odd).issubset(easy_odd) and set(S_even).issubset(easy_even) else print('No') import sys sys S = list(input()) S list(input()) list input() input S_odd = S[::2] S_odd S[::2] S ::2 2 S_even = S[1::2] S_even S[1::2] S 1::2 1 2 easy_odd = ['R','U','D'] easy_odd ['R','U','D'] 'R' 'U' 'D' easy_even = ['L','U','D'] easy_even ['L','U','D'] 'L' 'U' 'D' print('Yes') if set(S_odd).issubset(easy_odd) and set(S_even).issubset(easy_even) else print('No') set(S_odd).issubset(easy_odd) and set(S_even).issubset(easy_even) set(S_odd).issubset(easy_odd) (S_odd).issubset (S_odd) set S_odd issubset easy_odd set(S_even).issubset(easy_even) (S_even).issubset (S_even) set S_even issubset easy_even print('Yes') print 'Yes' print('No') print 'No' S = list(input()) list(input()) S S_even = S[1::2] S[1::2] S_even S_odd = S[::2] S[::2] S_odd easy_odd = ['R','U','D'] ['R','U','D'] easy_odd easy_even = ['L','U','D'] ['L','U','D'] easy_even
import sys
S = list(input())
S_odd = S[::2]
S_even = S[1::2]
easy_odd = ['R','U','D']
easy_even = ['L','U','D']

print('Yes') if set(S_odd).issubset(easy_odd) and set(S_even).issubset(easy_even) else print('No')