program main
  
   implicit none

   integer :: i,n 
   character(8), allocatable :: s(:) 
   
   read( *, * ) n

   allocate( s(n) )

   do i = 1, n
     read( *, * ) s(i)
   end do

   do i = 1, int( n/2 )
     if( s(i) == s(int( n/2 )+i) ) then 
     else
       print*, "No" 
       stop
     end if
   end do
   print*, "Yes" 

   deallocate( s )

end program main
