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 = raw_input()

ans = "Yes"
for i in range(len(S)):
  if not (i%2==0 and S[i] in "RUD" or i%2!=0 and S[i] in "LUD"):
    ans = "No"
print ans

Solution (Python):
S = input()
listkisuu = ['R','U','D']
listguusuu = ['L','U','D']

fumizuraiflg = 0

for i in range(len(S)):
    
    if (i+1) % 2 != 0:
        if S[i] not in listkisuu:
            fumizuraiflg = 1
    
    else:
        if S[i] not in listguusuu:
            fumizuraiflg = 1        
print('Yes' if fumizuraiflg == 0 else 'No')

Solution (Python):
S = input()

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

Solution (Python):
s = input()
l = {"R":1,"L":2,"U":3,"D":4}

ans = "Yes"
for i,c in enumerate(s):
    if i%2 == 0 and c == "L":
        ans = "No"
    elif i%2 != 0 and c == "R":
        ans = "No"
        
print(ans)

Solution (Python):
S=input()
if all(c in 'RUD' for c in S[::2]) and all(c in 'LUD' for c in S[1::2]):
  print("Yes")
else:
  print("No")

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

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

print ("No" if count==1 else "Yes")

Solution (Python):
import sys

s=str(input())

for i in range(len(s)):
    if i%2==0 and s[i]=="L":
        print("No")
        sys.exit(0)
    elif i%2==1 and s[i]=="R":
        print("No")
        sys.exit(0)

print("Yes")

Solution (Python):
import sys
S = input()
for i in range(len(S)):
    if i % 2 == 1 and S[i] == "R":
        print("No")
        sys.exit(0)
    elif i % 2 == 0 and S[i] =="L":
        print("No")
        sys.exit(0)
print("Yes")

Solution (Python):
s = list(input())
odd = []
even = []
for i in range(len(s)):
  if i % 2 == 0:
    odd.append(s[i])
  else:
    even.append(s[i])
if "L" in odd or "R" in even:
  print("No")
else:
  print("Yes")

Solution (Python):
S=input()
if all(c  in 'RUD' for c in S[::2]) and all(c in 'LUD' for c in S[1::2]):
  print("Yes")
else:
  print("No")

Solution (Python):
o = set(["R", "U", "D"])
e = set(["L", "U", "D"])

s = input()

if set(s[::2]) <= o and set(s[1::2]) <= e:
  print("Yes")
else:
  print("No")

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

Solution (Python):
S = input()
ans = True
for n in range(len(S)):
    if n%2 == 0:
        if S[n] not in ["R","U","D"]:
            ans = False
    else:
        if S[n] not in ["L","U","D"]:
            ans = False
if ans:
    print("Yes")
else:
    print("No")

Solution (Python):
S = input()
ans = True
for n in range(len(S)):
    if n%2 == 0:
        if S[n] not in ["R","U","D"]:
            ans = False
    else:
        if S[n] not in ["L","U","D"]:
            ans = False
if ans:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

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

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

lik = li[1::2]
lig = li[0::2]
a = 0
b = 0


if 'L' in lig:
    a = a + 1

if 'R' in lik:
    b = b + 1

if a + b == 0:
    print('Yes')
else:
    print('No')

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

Solution (Python):
S = list(input())
rtu = "Yes"
ks = 1
for i in S:
    if ks == 1:
        if i == "L":
            rtu = "No"
            ks = 0
            break
        else:
            ks = 0
    elif ks == 0:
        if i == "R":
            rtu = "No"
            ks = 1
            break
        else:
            ks = 1
print(rtu)

Solution (Python):
s=str(input())
a,b=s[::2],s[1::2]
c=any(l=="L" for l in a) | any(l=="R" for l in b)
print("Yes" if not c else "No")

Solution (Python):
N = list(input())
N.insert(0, '')
even = N[2::2]
odd = N[1::2]
if ('R' in even or 'L' in odd):
    print('No')
else:
    print('Yes')

Solution (Python):

ki=["R","U","D"]
gu=["L","U","D"]
s=input()
ans=True
i=1
for c in s:
    if ans==False:
        break
    if i%2==1:
        if c not in ki:
            ans=False
    if i%2==0:
        if c not in gu:
            ans=False
    i+=1
print("Yes" if ans else "No")

Solution (Python):
def solve(inp):
    S = inp.readline().strip()

    for i in range(0, len(S), 2):
        if S[i] == 'L':
            return 'No'
    for i in range(1, len(S), 2):
        if S[i] == 'R':
            return 'No'

    return 'Yes'


def test(s):
    from io import StringIO
    print(solve(StringIO(s)))


def main():
    import sys
    result = solve(sys.stdin)
    if result:
        print(result)


if __name__ == '__main__':
    
    main()

Solution (Python):
import itertools
a=list(input())
ans="Yes"
for i,j in enumerate(a):
  if i%2==0:
    if not(j=="R" or j=="U" or j=="D"):
      ans="No"
  else:
    if not (j=="L" or j=="U" or j=="D"):
      ans="No"
print(ans)

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

odd_taps = S[0::2]
even_taps = S[1::2]

if 'L' not in odd_taps and 'R' not in even_taps:
    print('Yes')
else:
    print('No')

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

Solution (Python):

S = input()
len_s = len(S)
ans = 'Yes'


for x in range(0,len_s,2):
  target = S[x]
  if target == 'L':
    ans = 'No'
  

for x in range(1,len_s,2):
  target = S[x]
  if target == 'R':
    ans = 'No'

print(ans)

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  

def solve(S: str):
    n = 0
    d = False
    for i in range(1,len(S)+1):
        if i % 2 == 1:
            if not ( S[i-1] == "R" or 
               S[i-1] == "U" or 
               S[i-1] == "D"):
                d = True
                break
        else:
            if not ( S[i-1] == "L" or 
               S[i-1] == "U" or 
               S[i-1] == "D"):
                d = True
                break

    if d:
        print(NO)
    else:
        print(YES)

    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)

if __name__ == '__main__':
    main()

Solution (Python):
S = input()
if all(c in 'RUD' for c in S[::2]) and all(c in 'LUD' for c in S[1::2]):
    print('Yes')
else:
    print('No')

Solution (Python):
S = input()
k = len(S)
ans = "Yes"

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

Solution (Python):
s = input()
n = len(s)
flag = 1
for i in range(n):
    if (i % 2 == 0) and (s[i] not in {'R', 'U', 'D'}):
        flag = 0
    if (i % 2 == 1) and (s[i] not in {'L', 'U', 'D'}):
        flag = 0

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

Solution (Python):
s = input()

odd = ["R", "U", "D"]
even = ["L", "U", "D"]

isYes = True

for i in range(len(s)):
    if i % 2 == 0:
        if s[i] not in odd:
            isYes = False
            break
    elif i % 2 != 0:
        if s[i] not in even:
            isYes = False
            break

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

Solution (Python):
def good(i, s):
    if i % 2 == 1:
        return s in ["R", "U", "D"]
    else:
        return s in ["L", "U", "D"]


S = input()

if all(good(i, s) for i, s in enumerate(S, 1)):
    print("Yes")
else:
    print("No")

Solution (Python):

import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def main():
    S = input()
    
    for i in range(len(S)):
        if not i % 2:
            if S[i] == "R" or S[i] == "U" or S[i] == "D":
                continue
            else:
                print("No")
                exit()
        else:
            if S[i] == "L" or S[i] == "U" or S[i] == "D":
                continue
            else:
                print("No")
                exit()
    print("Yes")




if __name__ == "__main__":
    main()

Solution (Python):


s = input()

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

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

Solution (Python):
S = input()

odd = ["R", "U", "D"]
even = ["L", "U", "D"]

if all([e in even for i, e in enumerate(S) if (i + 1) % 2 == 0]) and \
   all([o in odd for i, o in enumerate(S) if (i + 1) % 2 == 1]):
  print("Yes")
else:
  print("No")

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

for count in range(1,len(S)+1):
    if count % 2 == 1:
        if S[count-1] == "R" or S[count-1] == "U" or S[count-1] == "D":
            flag = False
        else:
            flag = True
            break
    else:
        if S[count-1] == "L" or S[count-1] == "U" or S[count-1] == "D":
            flag = False
        else:
            flag = True
            break

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

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

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

Solution (Python):


slist = list(input())

result = "Yes"

while len(slist) > 0 :
  s1 = slist.pop(0)
  if s1 == "L" :
    result = "No"
    break
  if len(slist) > 0:
    s2 = slist.pop(0)
    if s2 == "R":
      result = "No"
      break

print(result)

Solution (Python):


S = input()
res = 'Yes'

for i in range(len(S)):
    if (i + 1) % 2 == 0: 
        if S[i] == 'R':
            res = 'No'
            break
    else: 
        if S[i] == 'L':
            res = 'No'
            break

print(res)

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

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

Solution (Python):
s = input()

eList = []
oList = []
for i in range(len(s)):
  if (i+1) % 2 == 0:
    eList.append(s[i])
  else:
    oList.append(s[i])

if eList.count('R') > 0 or oList.count('L') > 0:
  print("No")
else:
  print("Yes")

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

Solution (Python):
odd = {"R", "U", "D"}
even = {"L", "U", "D"}
check = True

s = input()
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] not in odd:
            check = False
    else:
        if s[i] not in even:
            check = False

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

Solution (Python):
s = input()

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

print("Yes")

Solution (Python):
S = input()

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

Solution (Python):
def main():
    s = input()
    for i, c in enumerate(s):
        if (i + 1) % 2 == 0:
            pushable = 'LUD'
        else:
            pushable = 'RUD'
        if c not in pushable:
            print('No')
            return
    print('Yes')


main()

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

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

Solution (Python):
S = list(map(str, input()))
count1 = 0
count2 = 1
while count1+1 <= len(S):
    if S[count1] == 'L':
        print('No')
        break
    else: count1 +=2
else:
    while count2 < len(S):        
        if S[count2] == 'R':
            print('No')
            break
        else:
            count2 += 2
    else:
        print('Yes')

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

Solution (Python):
s = input()

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

print(result)

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

Solution (Python):

def ABC141B():
    S = input()

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

    print('Yes')
    return()

ABC141B()

Solution (Python):
S = input()
easy_in_odd = ["R", "U", "D"]
easy_in_even = ["L", "U", "D"]
is_easy = True
count = 1
for move in list(S):
    if count % 2 == 1 and move not in easy_in_odd:
        is_easy = False
        break
    elif count % 2 == 0 and move not in easy_in_even:
        is_easy = False
        break
    count += 1

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

Solution (Python):
cond1 = ['R','U','D']
cond2 = ['L','U','D']

S = list(input())

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

Solution (Python):
S = input()

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

Solution (Python):
s = input()

ng = 0

for c in s[::2]:
  if c not in 'RUD':
    ng = 1
    break
for c in s[1::2]:
  if c not in 'LUD':
    ng = 1
    break

print('Yes' if ng == 0 else 'No')

Solution (Python):
s = input()
s_length = len(s)

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

Solution (Python):
S = input()
n = len(S)
check = True
if n%2 == 0:
  for i in range(n//2):
    if not (S[2*i]=="R" or S[2*i]=="U" or S[2*i]=="D"):
      check = False
  for i in range(n//2):
    if not (S[2*i+1]=="L" or S[2*i+1]=="U" or S[2*i+1]=="D"):
      check = False
if n%2 != 0:
  for i in range((n+1)//2):
    if not (S[2*i]=="R" or S[2*i]=="U" or S[2*i]=="D"):
      check = False
  for i in range((n-1)//2):
    if not (S[2*i+1]=="L" or S[2*i+1]=="U" or S[2*i+1]=="D"):
      check = False
if(check):
  print("Yes")
else:
  print("No")

Solution (Python):
s = input()
 
oddStep = ['R','U','D']
evenStep = ['L','U','D']
CNST_NO = 'No'
CNST_YES = 'Yes'
good_step = CNST_YES
 
for i in range( len( s ) ):
  if i % 2 == 1: 
    if not ( s[ i ] in evenStep ):
      good_step = CNST_NO
  else:
    if not( s[ i ] in oddStep ):
      good_step = CNST_NO
  if good_step == CNST_NO:
    break
print( good_step )

Solution (Python):
s = input()
N = len(s)
a = 0
for x in range(0,N,2):
    if s[x] == "L":
        a = 1
for x in range(1,N,2):
    if s[x] == "R":
        a = 1
if a == 0:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

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

Solution (Python):
S = input()
flg = False
for i in range(len(S)):
    if i % 2 != 0:
        if S[i] in ["L", "U", "D"]:
            continue
        else:
            flg = True
    else:
        if S[i] in ["R", "U", "D"]:
            continue
        else:
            flg = True

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

Solution (Python):
S = input()
counter = 1
anscount = 1
for i in S:
  if counter % 2 == 1:
    if i == 'R' or i == 'U' or i == 'D':
      anscount += 1
  if counter % 2 == 0:
    if i == 'L' or i == 'U' or i == 'D':
      anscount += 1
  counter += 1
if counter == anscount:
  print("Yes")
else:
  print("No")

Solution (Python):
S=input()
K=[]
G=[]
for i in range(0,len(S),2):
  K.append(S[i])
  try:
    G.append(S[i+1])
  except:
    pass
if ('L' in K) or ('R' in G):
  print('No')
else:
  print('Yes')

Solution (Python):
a = input()
li = list(a)
judge = 'Yes'

for i in range(len(a)):
  if (i+1)%2 == 0 and li[i] == 'R':
    judge = 'No'
  if (i+1)%2 == 1 and li[i] == 'L':
    judge = 'No'
    
print(judge)

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

Solution (Python):
def main():
    s = input()

    odd = 1
    even = 1

    for i in range(1,len(s)+1):
        if i % 2 == 0:
            if s[i-1] == 'R':
                odd = 0
        else:
            if s[i-1] == 'L':
                even = 0

    if odd == 1 and even == 1:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

Solution (Python):
odd_step=["R","U","D"]
even_step=["L","U","D"]

s=input()

ans="Yes"
for i in range(len(s)):
  if i%2 != 0:
    if not s[i] in even_step:
      ans="No"
  else:
    if not s[i] in odd_step:
      ans="No"
print(ans)

Solution (Python):



S = input()

odd = []
even = []

for i in range(len(S)) : 
    if i % 2 == 0 : 
        odd.append(S[i])
    else : 
        even.append(S[i])
        
flag = 1

for i in odd : 
    if i != "R" and i != "U" and i != "D" : 
        flag = 0
        break
    
if flag != 0 : 
    for i in even : 
        if i != "L" and i != "U" and i != "D" : 
            flag = 0
            break
        
if flag == 1 : 
    print("Yes")
else : 
    print("No")

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

res = True
for i, s in enumerate(S, 1):
    if i % 2 == 0:
        if s not in ['L', 'U', 'D']:
            res = False
    else:
        if s not in ['R', 'U', 'D']:
            res = False

print("Yes" if res else "No")

Solution (Python):
s = input()

no = []
for i, ss in enumerate(s):
    if ((i + 1) % 2 == 0 and ss in ('L','U','D')) or ((i + 1) % 2 != 0 and ss in ('R', 'U', 'D')):
        pass
    else:
        no.append(ss)

if len(no) == 0:
    print('Yes')
else:
    print('No')

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

for i, m in enumerate(S):
    
    if i % 2 == 0 and m == 'L':
        print('No')
        flag = True
        break
    
    elif i % 2 == 1 and m == 'R':
        print('No')
        flag = True
        break
    else:
        continue

if not flag:
    print('Yes')

Solution (Python):
print(['No','Yes'][all([a in('RUD','LUD')[i%2]for i,a in enumerate(input())])])

Solution (Python):
def main():
    S = str(input())

    count = 0
    for s in S:
        if count == 0:
            count = 1
            if (s != "R") & (s != "U") & (s != "D"):
                return "No"
        else:
            count = 0
            if (s != "L") & (s != "U") & (s != "D"):
                return "No"
    return "Yes"

if __name__ == '__main__':
    print(main())

Solution (Python):
A = list(input())
B=[]
C=[]

for i in range(1,len(A),2):
  B.append(A[i])
for i in range(0,len(A),2):
  C.append(A[i])
B=set(B)
C=set(C)

if {'D', 'U', 'L'} >= B and {'D', 'U', 'R'} >= C:
  print('Yes')
else:
  print('No')

Solution (Python):
"""
author : halo2halo
date : 9, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

S = readline().decode('utf8').rstrip()
flag1 = True
flag2 = True
Sodd = S[::2]
Seven = S[1::2]

if Sodd.count('L') != 0:
    flag1 = False
if Seven.count('R') != 0:
    flag2 = False

print('Yes' if flag1 and flag2 else 'No')

Solution (Python):
"""
author : halo2halo
date : 9, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

S = readline().decode('utf8').rstrip()
flag1 = True
flag2 = True
Sodd = S[::2]
Seven = S[1::2]

if Sodd.count('L') != 0:
    flag1 = False
if Seven.count('R') != 0:
    flag2 = False

print('Yes' if flag1 and flag2 else 'No')

Solution (Python):
"""
author : halo2halo
date : 9, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

S = readline().decode('utf8').rstrip()
flag1 = True
flag2 = True
Sodd = S[::2]
Seven = S[1::2]

if Sodd.count('L') != 0:
    flag1 = False
if Seven.count('R') != 0:
    flag2 = False

print('Yes' if flag1 and flag2 else 'No')

Solution (Python):
S = list(input())
n = len(S)
odd = ['R', 'U', 'D']
even = ['L', 'U', 'D']
ans = "Yes"

for i in range(1, n+1):
    if i % 2 == 0:
        if not S[i-1] in even:
            ans = "No"
            break
        else:
            continue
    else:
        if not S[i-1] in odd:
            ans = "No"
            break
        else:
            continue

print(ans)

Solution (Python):
k = ['R','U','D']
g = ['L','U','D']

s = input()
for i in range(len(s)):
  if s[i] == 'U' or s[i] == 'D':
    continue
  else:
    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()
l = list(S)


for i in range(0, len(l), 2):
    if l[i] == 'L':
        print('No')
        exit()


for j in range(1, len(l), 2):
    if l[j] == 'R':
        print('No')
        exit()

print('Yes')

Solution (Python):
S = input()


for i in S[::2]:
    if i == 'L':
        print('No')
        exit()

for j in S[1::2]:
    if j == 'R':
        print('No')
        exit()

print('Yes')

Solution (Python):
s = input()

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

Solution (Python):
s = input()
s1 = s[::2]
s2 = s[1::2]

if 'L' in s1 or 'R' in s2:
  print('No')
else:
  print('Yes')

Solution (Python):
S = input()
 
for i in S[::2]:
    if i == "L":
        print("No")
        exit()
for j in S[1::2]:
    if j == "R":
        print("No")
        exit()
print("Yes")

Solution (Python):
S = input()

for i in S[::2]:
    if i == "L":
        print("No")
        exit()
for j in S[1::2]:
    if j == "R":
        print("No")
        exit()
print("Yes")

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

S_odd = S[0::2]
S_even= S[1::2]

o = set(S_odd).issubset(set(["R","U", "D"])) 
e = set(S_even).issubset(set(["L","U", "D"]))
if o + e == 2:
	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 = list(input())
n = len(s)

k,g=[],[]
for i in range(n):
    if i%2==0:
        k.append(s[i])
    else:
        g.append(s[i])


for j in k:
    if j == 'L':
        print('No')
        break

else:
    for l in g:
        if l == 'R':
            print('No')
            break
    else:
        print('Yes')

Solution (Python):
S = input()
if len(S[::2].replace('R','').replace('U','').replace('D','')) + len(S[1::2].replace('L','').replace('U','').replace('D',''))==0:
    print('Yes')
else:
    print('No')

Solution (Python):
s = list(input())
s_odd = []
s_even = []

for i in range(len(s)):
  if i % 2 == 0:
    s_even.append(s[i])
  else:
    s_odd.append(s[i])

ans_bool = True

if "L" in s_even:
  print("No")
elif "R" in s_odd:
  print("No")
else:
  print("Yes")

Solution (Python):


c = input()

ans = "Yes"
odd = ['R','U','D']
eval = ['L','U','D']
for i in range(len(c)):
    if i % 2 == 0 and not c[i] in odd:
        ans = "No"
    elif i % 2 == 1 and not c[i] in eval:
        ans = "No"
print(ans)

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

Solution (Python):
S = input()
ok = 1

for i in range(1,len(S)+1):
  if i%2!=0 and S[i-1]=='L':ok=0
  if i%2==0 and S[i-1]=='R':ok=0
    
if ok:
  print("Yes")
else:
  print("No")

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    s = S()
    n = len(s)
    f = True
    for i in range(0,n,2):
        if s[i] == "L":
            f = False
            break
    for i in range(1,n,2):
        if s[i] == "R":
            f = False
    if f:
        return 'Yes'

    return "No"


print(main())

Solution (Python):
s = input()

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

Solution (Python):
s = input()

even = []
odd = []
for i, elem in enumerate(s):
  if i % 2 == 0:
    odd.append(elem)
  else:
    even.append(elem)

if all(elem in ['D', 'U', 'L'] for elem in list(set(even))) and all(elem in ['U', 'R', 'D'] for elem in list(set(odd))):
  print("Yes")
else:
  print("No")

Solution (Python):
s = str(input())
odd = "RUD"
even = "LUD"
flag = True

for i in range(len(s)):
 if i%2 == 0 and s[i] not in odd:
  flag = False
 elif i%2 != 0 and s[i] not in even:
  flag = False

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

Solution (Python):



def main():
    s = list(input())
    gusu_count = 0
    kisu_count = 0
    
    for i in range(len(s)):
        if i % 2 == 0:
            if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
                kisu_count += 1
                
        else:
            if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
                gusu_count += 1
                
    if len(s) % 2 != 0:
        if gusu_count == len(s) // 2 and kisu_count == ((len(s) // 2 ) + 1):
            print('Yes')
    
        else:
            print('No')
            
    else:
        if gusu_count == len(s) // 2 and kisu_count == (len(s) // 2):
            print('Yes')
            
        else:
            print('No')
    
    return 0
    
    
if __name__ == '__main__':
    main()

Solution (Python):

import numpy as np


def main():
    
    taps = list(input())
    
    for i, tap in enumerate(taps):
        if i % 2 == 0 and tap in ('R', 'U', 'D'):
            pass
        elif i % 2 == 1 and tap in ('L', 'U', 'D'):
            pass
        else:
            print('No')
            return 0
    print('Yes')
    
    return 0
    
    
if __name__ == '__main__':
    main()

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


if __name__ == '__main__':
    main()

Solution (Python):
S = input()


def is_OK(S):
    i = 1
    for s in S:
        if i % 2 != 0:
            if s not in ['R', 'U', 'D']:
                return False
        elif i % 2 == 0:
            if s not in ['L', 'U', 'D']:
                return False
        i += 1
    return True


if is_OK(S):
    print('Yes')
else:
    print('No')

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

Solution (Python):
s = input()

ans = 'Yes'
for i, word in enumerate(s):
    if (i + 1) % 2 == 0:
        if word == 'R':
            ans = 'No'
    else:
        if word == 'L':
            ans = 'No'

print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
s=input().strip()
flg=True
for i in range(len(s)):
    if i%2==0:
        if s[i]=="L":
            flg=False
    else:
        if s[i]=="R":
            flg=False
if flg:
    print("Yes")
else:
    print("No")

Solution (Python):
s = input()

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

if set(s[::2])<=RUD and set(s[1::2]) <=LUD:
    print('Yes')
else:
    print('No')

Solution (Python):
s = list(input())
ans = 0
if len(s)%2==0:
    for i in range(len(s)//2):
        if s[2*i]=="L" or s[2*i+1]=="R":
            ans += 1
elif len(s)%2!=0:
    for i in range(len(s)//2):
        if s[2*i]=="L":
            ans += 1
        elif s[2*i+1]=="R":
            ans += 1
    if s[-1]=="L":
        ans += 1

if ans==0:
    print("Yes")
else:
    print("No")