N,K=map(int,input().split()) S=list(input()) stack=[] ans=[] sm=0 for s in S: if s=="(": if len(ans)>0 and ans[-1]==")": ans.append("+") ans.append(s) ans.append("1+") sm+=1 stack.append(s) else: if len(stack)==0:exit(print("No")) if ans[-1]=="1+": ans.append("1") sm+=1 ans.append(s) stack.pop() if len(stack)>0 or sm>K or (N==2 and K==2):exit(print("No")) while sm