program fm
  implicit none
  integer::N
  character(10**6)::S
  integer,allocatable,dimension(:)::UZUKI,KAGO
  logical::check
  integer::tmp
  integer::Ucnt,Kcnt

  integer::i,j
  read*,N
  allocate(UZUKI(N),KAGO(N))

  do i=1,N
    read*,S
    UZUKI(i)=0
    do j=1,len_trim(S)
      if(S(j:j)==")")then
        UZUKI(i)=UZUKI(i)+1
      else
        exit
      endif
    end do
    tmp=UZUKI(i)+1
    KAGO(i)=0
    do j=tmp,len_trim(S)
      if(S(j:j)==")")then
        KAGO(i)=KAGO(i)-1
      else
        KAGO(i)=KAGO(i)+1
      endif
    end do
    if(KAGO(i)<0)then
      UZUKI(i)=UZUKI(i)-KAGO(i)
    endif
    KAGO(i)=max(KAGO(i),0)
  end do
  call HeapsortPair(N,UZUKI,KAGO)
  Ucnt=0;Kcnt=0
  check=.true.
  do i=1,N
    Ucnt=Ucnt+Uzuki(i)
    if(Ucnt>Kcnt)then
      check=.false.
      exit
    endif
    Kcnt=Kcnt+KAGO(i)
  end do
  if(Ucnt/=Kcnt)check=.false.
  print"(A)",trim(merge("Yes","No ",check))
contains
subroutine HeapsortPair(n,array,array2)
  implicit none
!ここの入力は状況に応じて変更すること
  integer,intent(in) :: n
  integer,intent(inout) :: array(1:n),array2(1:n)
  integer::i,k,j,l
  integer:: t,t2

  l=n/2+1
  k=n
  do while(k /= 1)
     if(l > 1)then
        l=l-1
        t=array(L)
        t2=array2(L)
     else
        t=array(k)
        t2=array2(k)
        array(k)=array(1)
        array2(k)=array2(1)
        k=k-1
        if(k == 1) then
           array(1)=t
           array2(1)=t2
           exit
        endif
     endif
     i=l
     j=l+l
     do while(j<=k)
        if(j < k)then
           if(array(j) < array(j+1))j=j+1
        endif
        if (t < array(j))then
           array(i)=array(j)
           array2(i)=array2(j)
           i=j
           j=j+j
        else
           j=k+1
        endif
     enddo
     array(i)=t
     array2(i)=t2
  enddo
  return
end subroutine HeapsortPair
end program fm