Problem:
 Score: 200 points    Problem Statement  Takahashi will do a tap dance. The dance is described by a string S where each character is L , R , U , or D . These characters indicate the positions on which Takahashi should step. He will follow these instructions one by one in order, starting with the first character.  S is said to be easily playable if and only if it satisfies both of the following conditions:   Every character in an odd position ( 1 -st, 3 -rd, 5 -th, \ldots ) is R , U , or D .  Every character in an even position ( 2 -nd, 4 -th, 6 -th, \ldots ) is L , U , or D .   Your task is to print Yes if S is easily playable, and No otherwise.      Constraints   S is a string of length between 1 and 100 (inclusive).  Each character of S is L , R , U , or D .         Input  Input is given from Standard Input in the following format:  S       Output  Print Yes if S is easily playable, and No otherwise.        Sample Input 1 RUDLUDR      Sample Output 1 Yes  Every character in an odd position ( 1 -st, 3 -rd, 5 -th, 7 -th) is R , U , or D .  Every character in an even position ( 2 -nd, 4 -th, 6 -th) is L , U , or D .  Thus, S is easily playable.       Sample Input 2 DULL      Sample Output 2 No  The 3 -rd character is not R , U , nor D , so S is not easily playable.       Sample Input 3 UUUUUUUUUUUUUUU      Sample Output 3 Yes       Sample Input 4 ULURU      Sample Output 4 No       Sample Input 5 RDULULDURURLRDULRLR      Sample Output 5 Yes

Solution (Python):
s=list(input())
for i in range(len(s)):
  if i%2==1:
    if s[i]=='L' or s[i]=='U' or s[i]=='D':
      pass
    else:
      print('No')
      exit()
  else:
    if s[i]=='R' or s[i]=='U' or s[i]=='D':
      pass
    else:
      print('No')
      exit()
    
print('Yes')

Solution (Python):
S = input()
S1 = S[0::2]
S2 = S[1::2]

S_count = S1.count('R') + S1.count('U') + S1.count('D')+ S2.count('L') + S2.count('U') + S2.count('D')

if len(S) == S_count:
    print('Yes')
else:
    print('No')

Solution (Python):



import sys
from collections import defaultdict, deque
from heapq import heappush, heappop
import math
import bisect
input = sys.stdin.readline




s = input()[:-1]

ans = True
for i in range(len(s)):
    if (i+1) % 2 == 1:
        
        if s[i] == 'L':
            ans =False
            break
    if (i + 1) % 2 == 0:
        
        if s[i] =='R':
            ans = False
            break

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

Solution (Python):
s=list(input())

l=[]
for i in s[1::2]:
  l.append(i)

new_l=[]
for i in s[::2]:
  new_l.append(i)
ans=0
if 'L' in new_l:
  ans='No'
else:
  ans='Yes'
num=0
if 'R' in l:
  num='No'
else:
  num='Yes'

if ans == 'Yes' and num == 'Yes':
  print('Yes')
else:
  print('No')

Solution (Python):
S=input()
if S[0::2].count("L")==0 and S[1::2].count("R")==0:
  print("Yes")
else:
  print("No")

Solution (Python):
S = input()
LS = list(S)
L = len(S)

LSK = LS[0:L:2]
LSG = LS[1:L:2]

if "L" in LSK or "R" in LSG:
    print("No")
else:
    print("Yes")

Solution (Python):
S = input()

odd_list = ['R', 'U', 'D']
even_list = ['L', 'U', 'D']

answer = 'Yes'
for i in range(0, len(S)):
    if (i+1) % 2 == 0:
        if S[i] not in even_list:
            answer = 'No'
            break
    else:
        if S[i] not in odd_list:
            answer = 'No'
            break

print(answer)

Solution (Python):
S = input()

odd_li = ['R', 'U', 'D']
even_li = ['L', 'U', 'D']

for i in range(len(S)):
    if i%2==0: 
        if not S[i] in odd_li:
            print('No')
            exit()
    else:
        if not S[i] in even_li:
            print('No')
            exit()

print('Yes')

Solution (Python):

def main():
    S = list(input())
    for i, c in enumerate(S):
        if i % 2 == 0 and c == "L":
            print("No")
            return
        if i % 2 == 1 and c == "R":
            print("No")
            return
    print("Yes")

if __name__ == "__main__":
    main()

Solution (Python):
def main():
    S = input()
    for num, i in enumerate(S, 1):
        if num % 2 == 0:
            if i != "L" and i != "U" and i != "D":
                print("No")
                exit(0)

        else:
            if i != "R" and i != "U" and i != "D":
                print("No")
                exit(0)

    print("Yes")


if __name__ == "__main__":
    main()

Solution (Python):
S = list(input())
kis = set(S[::2])
gus = set(S[1::2])
print("Yes" if kis.issubset({"R", "U", "D"}) & gus.issubset({"L", "U", "D"}) else "No")

Solution (Python):
s = input()
flg = 0
for i in range(0, len(s), 2):
    if s[i]=='R'or s[i]=='U' or s[i]=='D':
        flg = 1
    else:
        flg = 0
        break
if (flg):
    for i in range(1, len(s), 2):
        if s[i]=='L'or s[i]=='U' or s[i]=='D':
            flg = 1
        else:
            flg = 0
            break
if (flg):
    print("Yes")
else: print("No")

Solution (Python):
s = list(input())
if "L" in s[0::2] or "R" in s[1::2]:
  print("No")
else:
  print("Yes")

Solution (Python):
s=list(input())
for i in range(len(s)):
  if i%2!=0:
    if s[i]=='L' or s[i]=='U' or s[i]=='D':
      s[i]='i'
      
  else:
    if s[i]=='R' or s[i]=='U' or s[i]=='D':
      s[i]='i'
      

if s==['i']*len(s):
  print('Yes')
  
else:
  print('No')

Solution (Python):
S=input()
flag=False
for i in range(len(S)):
  if i%2==0:
    if S[i]!='R' and S[i]!='U' and S[i]!='D':
      flag=True
  else:
    if S[i]!='L' and S[i]!='U' and S[i]!='D':
      flag=True
if flag==True:
  print('No')
else:
  print('Yes')

Solution (Python):
s = input()

for i in range(1,len(s)+1):
    if i % 2 == 1 and s[i-1] == 'L':
        print('No')
        exit()
    if i % 2 == 0 and s[i-1] == 'R':
        print('No')
        exit()
print('Yes')

Solution (Python):
s = input()

w1 = [ "R", "U", "D"]
w2 = [ "L", "U", "D"]

for i in range(len(s)):
  if i % 2 == 0:
    if not s[i] in w1 :
      print("No")
      exit()
  else :
    if not s[i] in w2 :
      print("No")
      exit()
print("Yes")

Solution (Python):
s = input()

for i in range(len(s)):
    if i % 2 == 1 and s[i] == 'R':
        print('No')
        exit()
    if i % 2 == 0 and s[i] == 'L':
        print('No')
        exit()
print('Yes')

Solution (Python):
import sys
s=input()
n=len(s)

gomilist=["L","R"]*(n//2)
if n%2 == 1:
    gomilist.append("L")

for i in range(len(s)):
    if s[i] == gomilist[i]:
        print("No")
        sys.exit()

print("Yes")

Solution (Python):
S = input()

for i in range(len(S)):
    if i % 2 == 0:
        if S[i] == "L":
            print("No")
            exit()
    else:
        if S[i] == "R":
            print("No")
            exit()
print("Yes")

Solution (Python):
import sys
s=input()
a=["R","U","D"]
b=["L","U","D"]
for i in range(len(s)):
    if i%2==0:
        if s[i] not in a:
            print("No")
            sys.exit()
    else:
        if s[i] not in b:
            print("No")
            sys.exit()
print("Yes")

Solution (Python):
s = input()
sk = s[0::2]
sg = s[1::2]
if "L" not in sk and "R" not in sg:
	print("Yes")
else:
	print("No")

Solution (Python):
S = input()
ok = True
for i in range(len(S)):
    if (i + 1) % 2:
        if S[i] not in ['R', 'U', 'D']:
            ok = False
    else:
        if S[i] not in ['L', 'U', 'D']:
            ok = False

if ok:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
count = 0
for i in range(len(s)):
    if (i+1) % 2 != 0 and (s[i] == 'R' or s[i] == 'U' or s[i] == 'D'):
        count += 1
    elif (i+1) % 2 == 0 and (s[i] == 'L' or s[i] == 'U' or s[i] == 'D'):
        count += 1
if count == len(s):
    print('Yes')
else:
    print('No')

Solution (Python):
s = input()

flg = False
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] == "L":
            flg = True
    else:
        if s[i] == "R":
            flg = True

ans = "Yes"
if flg: ans = "No"
print(ans)

Solution (Python):
s=input()
ans='Yes'
n=len(s)
for i in range(n):
  if i%2:
    if s[i]=='R': ans='No';break
  else:
    if s[i]=='L': ans='No';break
print(ans)

Solution (Python):
s = input()
for i, j in enumerate(s):
    if (i + 1) % 2 == 1 and j == 'L':
        print('No')
        exit()
    elif (i + 1) % 2 == 0 and j == 'R':
        print('No')
        exit()
print('Yes')

Solution (Python):
s = input()
for i, j in enumerate(s):
    if (i + 1) % 2 == 1 and j == 'L':
        print('No')
        exit()
    elif (i + 1) % 2 == 0 and j == 'R':
        print('No')
        exit()
print('Yes')

Solution (Python):
def main():
    S = input()
    count = 1
    flg = True
    for s in S:
        if count % 2 == 0 and s == 'R':
            print('No')
            exit()
        elif count % 2 == 1 and s == 'L':
            print('No')
            exit()
        count += 1
    print('Yes')

if __name__ == '__main__':
    main()

Solution (Python):
s = input()
n = len(s)
for i in range(n):
    if i % 2 == 0:
        if s[i] == 'L':
            break
    else:
        if s[i] == 'R':
            break
else:
    print('Yes')
    exit()
print('No')

Solution (Python):
S=input()


nagasa=len(S)
count=0
for i in range(nagasa):
    if (i+1)%2==1:    
        if S[i]=="R" or S[i]=="U" or S[i]=="D":
            count+=0
        else:
            print("No")
            exit()
    else:
        if S[i]=="L" or S[i]=="U" or S[i]=="D":
            count+=0
        else:
            print("No")
            exit()
print("Yes")

Solution (Python):
s = input()
ans = 1
for i in range(len(s)):
    if i %2 == 0:
        if s[i] == "R" or s[i] == "U" or s[i] == "D":
            pass
        else:
            ans = 0
    else:
        if s[i] == "L" or s[i] == "U" or s[i] == "D":
            pass
        else:
            ans = 0
if ans == 1:
    print("Yes")
else:
    print("No")

Solution (Python):
def actual(s):
    odd_steps = set(s[::2])
    even_steps = set(s[1::2])

    cond1 = odd_steps.issubset({'U', 'D', 'R'})
    cond2 = even_steps.issubset({'U', 'D', 'L'})

    if cond1 and cond2:
        return 'Yes'

    return 'No'

s = input()

print(actual(s))

Solution (Python):
s = input()
result = True

for i in range(len(s)):
    
    if i%2 == 0:
        if s[i]=="L":
            result = False
            break
    else:
        if s[i]=="R":
            result = False
            break


if result:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()

SR = S[0 : : 2]
SL = S[1 : : 2]

print('No' if 'L' in SR or 'R' in SL else 'Yes')

Solution (Python):
S = input()
lis = list()
for i in range(len(S)):
    if i % 2==0:
        if S[i] == "U" or S[i] == "R"or S[i] == "D":
            lis.append(True)
        else:
            lis.append(False)
    else:
        if S[i] == "L" or S[i] == "U"or S[i] == "D":
            lis.append(True)
        else:
            lis.append(False)


if all(lis):
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

for i, j in enumerate(s):
    if (i + 1) % 2 == 1:
        if j == 'L':
            print('No')
            exit()
    else:
        if j == 'R':
            print('No')
            exit()

print('Yes')

Solution (Python):
s = input()
a = [s[i] for i in range(len(s)) if (i + 1) % 2 == 1]
b = [s[i] for i in range(len(s)) if (i + 1) % 2 == 0]
a = list(set(a))
b = list(set(b))
a.sort()
ans = ''
for e in a:
  if ans == '':
    if e == 'R' or e == 'U' or e == 'D':
      next
    else:
      ans = 'No'
if ans == '':
  for e in b:
    if ans == '':
      if e == 'L' or e == 'U' or e == 'D':
        next
      else:
        ans = 'No'
if ans == '':
  ans = 'Yes'
print(ans)

Solution (Python):
import sys

input = lambda: sys.stdin.readline().rstrip()


def solve():
    S = list(input())
    N = len(S)
    rud = ['R', 'U', 'D']
    lud = ['L', 'U', 'D']

    flag = True
    for i in range(N):
        if (i + 1) % 2 == 0:
            if not (S[i] in lud):
                flag = False
        else:
            if not (S[i] in rud):
                flag = False

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


if __name__ == '__main__':
    solve()

Solution (Python):
s = input()

for num, val in enumerate(s):
    if (num + 1) % 2 == 1:
        if val == "L":
            print("No")
            break
    else:
        if val == "R":
            print("No")
            break
else:
    print("Yes")

Solution (Python):
s = input()
for i in range(len(s)):
    if i % 2 == 0 and s[i] == 'L':
        print('No')
        exit()
    if i % 2 == 1 and s[i] == 'R':
        print('No')
        exit()
print('Yes')

Solution (Python):
a=input()
ok=True
for i in range(len(a)):
    if (i+1)%2==0 and a[i]=="R":
        ok=False
        break
    if (i+1)%2==1 and a[i]=="L":
        ok=False
        break

if ok:
    print("Yes")
else:
    print("No")

Solution (Python):
s=input()
for i in range(len(s)):
    if (s[i]=="R" and (i+1)%2==0) or (s[i]=="L" and (i+1)%2==1):
        print("No")
        exit()
print("Yes")

Solution (Python):
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


s = S()
ans = 'Yes'
for i in range(len(s)):
    
    if i % 2 == 0 and s[i] in {'R', 'U', 'D'}:
        
        continue
    elif i % 2 != 0 and s[i] in {'L', 'U', 'D'}:
        
        continue
    
    ans = 'No'
    break
print(ans)

Solution (Python):
a = ["R", "U", "D"]
b = ["L", "U", "D"]
s = input()
iscan = True
for i in range(len(s)):
    if i%2 == 0:
        if s[i] not in a:
            iscan = False
    else:
        if s[i] not in b:
            iscan = False
print("Yes" if iscan else "No")

Solution (Python):
S = input()
for i in range(len(S)):
    if ((i % 2 == 0) and S[i] == "L") or ((i % 2 == 1) and S[i] == "R"):
        print("No")
        break
else:
    print("Yes")

Solution (Python):
s = input()
n = len(s)
ok = True
for i in range(n):
    if i % 2 == 0:
        if s[i] == 'L': ok = False
    else:
        if s[i] == 'R': ok = False
if ok: print('Yes')
else: print('No')

Solution (Python):
s = input()
a = True

for i in range(len(s)):
    if i%2==0 and s[i]=="L":
        a = False
    elif i%2 ==1 and s[i]=="R":
        a = False
if a:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()
if  'R' in s[1::2] or 'L' in s[::2] :
    print('No')
else:
    print('Yes')

Solution (Python):
import sys
import decimal 

def input():
    return sys.stdin.readline().strip()

def main():
    s = input()
    for i in range(len(s)):
        if (i+1) % 2 == 0:
            if s[i] == "R":
                print("No")
                return
        else:
            if s[i] == "L":
                print("No")
                return
    print("Yes")
    

    
    
main()

Solution (Python):
S = input()
L = len(S)
odd = "RUD"
even = "LUD"
for i in range(L):
  if (i+1)%2 != 0:
    if S[i] not in odd:
      print("No")
      exit()
  else:
    if S[i] not in even:
      print("No")
      exit()
print("Yes")

Solution (Python):
is_odd = True
for i in input():
    if is_odd and i in ("R","U","D"):
        is_odd = not is_odd
    elif not is_odd and i in ("L","U","D"):
        is_odd = not is_odd
    else:
        print("No")
        break
else:
    print("Yes")

Solution (Python):
s = input()
s = list(s)
even = ["L","U","D","0"]
odd = ['R',"U","D"]


s.insert(0,"0")
for i in range(len(s)):
  
  if(i%2 == 0):
    if(s[i] not in even):
      print("No")
      exit()
  else:
    if(s[i] not in odd):
      print("No")
      exit()
print("Yes")

Solution (Python):
n=input()
l=len(n)
h="Yes"
for i in range(0,len(n)):
    if (i+1)%2!=0:
        if n[i]=="R"or n[i]=="U"or n[i]=="D" :
            pass
        else:
            h="No"
            break
    else:
        if n[i]=="L"or n[i]=="U"or n[i]=="D" :
            pass
        else:
            h="No"
            break
print(h)

Solution (Python):
S = input()
even = [v for i, v in enumerate(S) if i % 2 == 0]
odd = [v for i, v in enumerate(S) if i % 2 == 1]
count = even.count("L") + odd.count("R")
print("Yes" if count == 0 else "No")

Solution (Python):
S = input()

odd_cond = True
even_cond = True

for i,s in enumerate(S):
    if (i+1)%2 == 1:
        if s not in ["R", "U", "D"]:
            odd_cond = False
            break
    else:
        if s not in ["L", "U", "D"]:
            even_cond = False
            break
        
            
if odd_cond and even_cond:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
print('No' if 'L' in S[::2] or 'R' in S[1::2] else 'Yes')

Solution (Python):
s=input()
a=s[::2]
b=s[1::2]
ans=0
if not "L" in a and not "R" in b:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

a = set(['R','U','D'])
b = set(['L','U','D'])

ck = False
for i,data in enumerate(s):
  if (i+1) % 2 :
    if not data in a:
      break
  else :
    if not data in b:
      break
else:
  ck = True

print('Yes' if ck else 'No')

Solution (Python):

s = input()
a = s[::2].count('L') + s[1::2].count('R')
if a > 0:
    print('No')
else:
    print('Yes')

Solution (Python):
s = input()


flag = 1
for i in range(0,len(s)):
    if i % 2 == 0:
        if s[i] == "L":
            flag = 0
            break
    else:
        if s[i] == "R":
            flag = 0
            break

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

Solution (Python):
S = input()

youtube = 0

for i in range(len(S)):
  if i % 2 == 0: 
    if S[i] == "L":
      youtube += 1
  else:
    if S[i] == "R":
      youtube += 1
if youtube > 0:
  print("No")
else:
  print("Yes")

Solution (Python):
s = input()
ans = 0
for i in range(len(s)):
  if i%2 != 0:
    if s[i]=='L' or s[i]=='U'or s[i]=='D':
      ans+=1
    else:
      ans+=0
  else:
    if s[i]=='R' or s[i]=='U'or s[i]=='D':
      ans+=1
    else:
      ans+=0
print('Yes' if ans == len(s) else 'No')

Solution (Python):
S = list(input())

for i in range(len(S)):
    if i % 2 == 1:
        if S[i] not in ["L", "U", "D"]:
            print("No")
            exit()
    else:
        if S[i] not in ["R", "U", "D"]:
            print("No")
            exit()
print("Yes")

Solution (Python):
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    s = list(input()[:-1].decode())
    for i in range(len(s)):
        if i % 2 == 0:
            if not s[i] in ['R', 'U', 'D']:
                print('No')
                exit()
        else:
            if not s[i] in ['L', 'U', 'D']:
                print('No')
                exit()
    print('Yes')


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Solution (Python):
def f(s):
	p = True
	for u in s:
		if u == ('L' if p else 'R'): return False
		p ^= True 
	return True
print 'Yes' if f(raw_input()) else 'No'

Solution (Python):
def f(s):
	p = True
	for u in s:
		if u not in ('RUD' if p else 'LUD'): return False
		p ^= True 
	return True
print 'Yes' if f(raw_input()) else 'No'

Solution (Python):
s=input()
print("No" if "L" in s[::2] or "R" in s[1::2] else "Yes")

Solution (Python):
S = input()

mem = True
for i, s in enumerate(S):
    if (i+1)%2 == 1:
        if not s in ['R', 'U', 'D']:
            mem *= False
    else:
        if not s in ['L', 'U', 'D']:
            mem *= False
if mem:
    print('Yes')
else:
    print('No')

Solution (Python):
s = str(input())
a = True
b = True
for i in range(0,len(s),2):
    if s[i] != "R" and s[i] != "U" and s[i] != "D":
        a = False
for i in range(1,len(s),2):
    if s[i] != "L" and s[i] != "U" and s[i] != "D":
        b = False
if a and b:
    print("Yes")
else:
    print("No")

Solution (Python):


s = input()
s_len = len(s)

odd = s[::2] 
even = s[1::2]

if "L" in odd:
    print("No")
elif "R" in even:
    print("No")
else:
    print("Yes")

Solution (Python):
s=input()
print('Yes' if ('L' not in s[::2] and 'R' not in s[1::2]) else 'No')

Solution (Python):
s=str(input())
s=list(s)
counta=0
countb=0
for i in range(len(s)):
  if(i%2==0):
    if(s[i]=="R" or s[i]=="U" or s[i]=="D"):
      counta+=1
  elif(i%2==1):
    if(s[i]=="L" or s[i]=="U" or s[i]=="D"):
      countb+=1
if(counta+countb==len(s)):
  print("Yes")
  
else:
  print("No")

Solution (Python):
s = input()
even = ["R","U","D"]
odd = ["L","U","D"]
for i in range(len(s)):
    if i % 2 == 0:
        if not s[i] in even:
            print("No")
            break
    else:
        if not s[i] in odd:
            print("No")
            break
else:
    print("Yes")

Solution (Python):
tap=input()
f=0
for i,s in enumerate(tap):
  if i % 2 == 0:
    if s not in 'RUD':
      f = 1
      break
  else:
    if s not in 'LUD':
      f = 1
      break
print('YNeos'[f::2])

Solution (Python):
s = input()

l_odd = ['R', 'U', 'D']
l_even = ['L', 'U', 'D'] 

for i, ch in enumerate(s):
    if (i+1)%2 != 0 and ch not in l_odd:
        print('No')
        break
    if (i+1)%2 == 0 and ch not in l_even:
        print('No')
        break
else:
    print('Yes')

Solution (Python):
S = input()
flag = True

for x in range(len(S)):
    if x % 2 == 0:
        if S[x] != "R" and S[x] != "U" and S[x] != "D":
            flag = False
            break
    else:
        if S[x] != "L" and S[x] != "U" and S[x] != "D":
            flag = False
            break
if flag:
    print("Yes")
else:
    print("No")

Solution (Python):
S=input()
print("No" if "L" in S[::2] or "R" in S[1::2] else "Yes")

Solution (Python):
S = input()
print("No" if "L" in S[::2] or "R" in S[1::2] else "Yes")

Solution (Python):

import sys

s = input()

for i in range(len(s)):
    if(i%2 ==0):
        if(s[i] != 'R'and s[i] != 'U' and s[i] != 'D'):
            print('No')
            sys.exit()
    else:
        if(s[i] != 'L'and s[i] != 'U' and s[i] != 'D'):
            print('No')
            sys.exit()

print("Yes")

Solution (Python):
import sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

odd = 'RUD'
even = 'LUD'

S = rs()

for i, c in enumerate(S):
	if i % 2 == 0:
		if c not in odd:
			print('No')
			exit()
	else:
		if c not in even:
			print('No')
			exit()
print('Yes')

Solution (Python):
def examA():
    W = {'Sunny':'Cloudy','Cloudy':'Rainy','Rainy':'Sunny'}
    S = SI()
    ans = W[S]
    print(ans)
    return

def examB():
    R = {"R","U","D"}
    L = {"L","U","D"}
    S = SI()
    ans = "Yes"
    for i,s in enumerate(S):
        if i%2==0 and s in R:
            continue
        if i%2==1 and s in L:
            continue
        ans = "No"
        break
    print(ans)
    return

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    
    def z_algo(S):
        N = len(S)
        A = [0] * N
        i = 1; j = 0
        A[0] = l = len(S)
        while i < l:
            while i + j < l and S[j] == S[i + j]:
                j += 1
            if not j:
                i += 1
                continue
            A[i] = j
            k = 1
            while l - i > k < j - A[k]:
                A[i + k] = A[k]
                k += 1
            i += k; j -= k
        return A
    N = I()
    S = SI()
    ans = 0
    for i in range(N):
        Z = z_algo(S[i:])
        for k,n in enumerate(Z[1:]):
            cur = min(k+1,n)
            ans = max(ans,cur)
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

import sys,copy,bisect,itertools,heapq,math,random
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = 10**(-12)
alphabet = [chr(ord('a') + i) for i in range(26)]

if __name__ == '__main__':
    examB()

"""

"""

Solution (Python):

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


def main():
    S = list(readline().rstrip().decode())
    for s in S[::2]:
        if s == 'L':
            print('No')
            return
    for s in S[1::2]:
        if s == 'R':
            print('No')
            return
    print('Yes')


if __name__ == '__main__':
    main()

Solution (Python):
s = input()
odd = ['R', 'U', 'D']
even = ['L', 'U', 'D']
ans = 'Yes'
for i in range(len(s)):
    if i % 2:
        if s[i] not in even:
            ans = 'No'
    else:
        if s[i] not in odd:
            ans = 'No'
print(ans)

Solution (Python):
s= str(input())

for i in range(len(s)):
    if (i+1)%2==1:
        if s[i] not in "RUD":
            print('No')
            exit(0)
        else:
            pass
    else:
        if s[i] not in "LUD":
            print('No')
            exit(0)
        else:
            pass
print("Yes")

Solution (Python):
S = input()
print('No' if 'L' in S[::2] or 'R' in S[1::2] else 'Yes')

Solution (Python):
s = input()
k = ['R', 'U', 'D']
g = ['L', 'U', 'D']
k_count = 0
g_count = 0
kisuu = 0
guusuu = 0
for i in range(0, len(s)):
  if i%2 != 0:
    guusuu += 1
    if (s[i] in g) == True:
      g_count += 1
  if i%2 == 0:
    kisuu += 1
    if (s[i] in k) == True:
      k_count += 1
if kisuu == k_count and guusuu == g_count:
  print('Yes')
else:
  print('No')

Solution (Python):
s = input()

for i in range(len(s)):
    
    if i % 2 ==0:
        if s[i] == 'L':
            print('No')
            exit()
    
    else:
        if s[i] == 'R':
            print('No')
            exit()
            
print('Yes')

Solution (Python):
S = input()
flg = True

for i, c in enumerate(S):
    if (i%2==0 and c=='L') or (i%2==1 and c=='R'):
        flg = False

print('Yes' if flg else 'No')

Solution (Python):
s = list(input())
ans = "Yes"
for i in range(len(s)):
    if i%2 == 0: 
        if s[i] == 'L':
            ans = "No"
    else:
        if s[i] == 'R':
            ans = "No"

print (ans)

Solution (Python):
s = input()
ls = len(s)
isOk = True
for i in range(ls):
    if(i%2==1 and s[i]=='R'):
        isOk = False
    if(i%2==0 and s[i]=='L'):
        isOk = False

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

Solution (Python):
s=input()
if 'L' in s[0::2] or 'R' in s[1::2]:
  print('No')
else:
  print('Yes')

Solution (Python):
S=input()
if 'R' in S[1::2] :
    print('No')
elif 'L' in S[0::2] :
    print('No')
else:
    print('Yes')

Solution (Python):
s=input()
n=len(s)
ans="Yes"
if n%2==0:
    for i in range(n//2):
        if s[2*i]=="L":
            ans="No"
            break
        if s[2*i+1]=="R":
            ans="No"
            break
else:
    if s[0]=="L":
        ans="No"
    for i in range(1,n//2+1):
        if s[2*i]=="L":
            ans="No"
            break
        if s[2*i-1]=="R":
            ans="No"
            break
print(ans)

Solution (Python):
S = input()

R = {'R', 'U', 'D'}
L = {'L', 'U', 'D'}


for i, s in enumerate(S):
    if i % 2 == 0:
        if s not in R:
            print('No')
            exit()
    else:
        if s not in L:
            print('No')
            exit()
print('Yes')

Solution (Python):
def tap_dance(s):

    ki = s[0::2]
    gu = s[1::2]
    ans = "Yes"

    if "L" in ki:
        ans = "No"
    if "R" in gu:
        ans = "No"

    return ans

def main():
    s = str(input())
    print(tap_dance(s))

if __name__ == '__main__':
    main()

Solution (Python):
s = input()
ans = "Yes"

for i in range(len(s)):
    if i%2 == 0 and s[i] == "L":
        ans = "No"
        break
    elif i%2 == 1 and s[i] == "R":
        ans = "No"
        break

print(ans)

Solution (Python):
s=input()
 
ans="Yes"
for i in range(len(s)):
  if i%2==0 and s[i]=="L":
    ans="No"
  if i%2!=0 and s[i]=="R":
    ans="No"
    
print(ans)

Solution (Python):
s = input()
t = list(filter(lambda x: x in ['R','U','D'],s[0::2]))
u = list(filter(lambda x: x in ['L','U','D'],s[1::2]))
print('Yes' if len(s[0::2]) == len(t) and len(s[1::2]) == len(u) else 'No')

Solution (Python):
s=input()
c=0
for i in range(len(s)):
    if i%2==0:
        if s[i] not in "RUD":
            c+=1
            break
    else:
        if s[i] not in "LUD":
            c+=1
            break
print("Yes"if c==0 else"No")

Solution (Python):
S = list(input())
dic = [["R","U","D"],["L","U","D"]]
for i in range(0,len(S),1):
    if not(S[i] in dic[i%2]):
        print("No")
        exit()
print("Yes")

Solution (Python):
s=input()
for i in range(len(s)):
    if i%2==0:
        if s[i]=="R" or s[i]=="U" or s[i]=="D":
            pass
        else:
            print("No")
            exit()
    else:
        if s[i]=="L" or s[i]=="U" or s[i]=="D":
            pass
        else:
            print("No")
            exit()
print("Yes")

Solution (Python):
ss = input()
count = 0
ans  = 0
for s in ss:
    if count%2 == 0 and s != "L":
        pass
    elif count%2 == 0:
        ans += 1
    elif count%2 == 1 and s != "R":
        pass
    elif count%2 == 1:
        ans += 1
    count += 1
if ans == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()

for i in range(len(S)):
  if i % 2 == 0:
    if S[i] == "L":
      print("No")
      exit()
  else:
    if S[i] == "R":
      print("No")
      exit()
      
print("Yes")

Solution (Python):
S = input()
FLG = True

for i,step in enumerate(S):
    if step in "UD":
        continue
    if step == "L" and i % 2 == 0:
        FLG = False
        break
    if step == "R" and i % 2 == 1:
        FLG = False
        break

if FLG:
    print("Yes")
else:
    print("No")

Solution (Python):
odd = ['R','U','D']
even = ['L','U','D']
yesno = 'Yes'
S = list(input())
for i in range(len(S)):
  if i%2 == 0 and S[i] in odd:
    continue
  elif i%2 == 1 and S[i] in even:
    continue
  else:
    yesno = 'No'
    break
print(yesno)

Solution (Python):
S = input()
frag = True
c = 0
for i in S:
    if c%2==0:
        if i=='L':
            frag = False
    if c%2==1:
        if i=='R':
            frag = False
    c+=1
if frag:
    print("Yes")
else:
    print("No")

Solution (Python):
"""
abc141-b
"""

S = input()

ans="Yes"

for i in range(int(len(S))):
    if (i % 2 == 0):
        if (S[i] == "L"):
            ans="No"
            break
    else:
        if (S[i] == "R"):
            ans="No"
            break
print(ans)

Solution (Python):
ss=input().strip()
ki=["R","U","D"]
gu=["L","U","D"]

ans="Yes"
for i in range(len(ss)):
  if (i+1)%2==0:
    if ss[i]=="R":
      ans="No"
      break
  else:
    if ss[i]=="L":
      ans="No"
      break
print(ans)

Solution (Python):
Ss = input().rstrip()

if 'L' not in Ss[::2] and 'R' not in Ss[1::2]:
    print('Yes')
else:
    print('No')

Solution (Python):
S=input()
N=len(S)
OK=[0]*N
for i in range(N):
    if (i+1)%2==0:
        if S[i]=="L" or S[i]=="U" or S[i]=="D":
            OK[i]=1
        else :
            OK[i]=0
    else :
        if S[i]=="R" or S[i]=="U" or S[i]=="D":
            OK[i]=1
        else :
            OK[i]=0
print("Yes" if sum(OK)==N else "No")

Solution (Python):
s = input()
s = list(s)
flag = True
temp = 0
for i in range(len(s)):
    temp += 1
    if temp % 2 == 1 :
        if s[i] == "R" or s[i] == "U" or s[i] == "D":
            continue
        else:
            flag = False
    elif temp % 2 == 0:
        if s[i] == "L" or s[i] == "U" or s[i] == "D":
            continue
        else:
            flag = False

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

Solution (Python):
S=input()
print("Yes" if "L" not in S[::2] and "R" not in S[1::2] else "No")