/*|In The Name of Allah|*/
/* Dear GCC compiler:
*
* If my code doesn't compile, this doesn't mean it's wrong.
* It just mean that you don't understand what I want.
* Here's my safety pig, I hope my code compile and get accepted.
* _._ _..._ .-',     _.._(`))
*'-. `     '  /-._.-'    ',/
*   )         \            '.
*  / _    _    |             \
* |  a    a    /              |
* \   .-.                     ;
*  '-('' ).-'       ,'       ;
*     '-;           |      .'
*        \           \    /
*        | 7  .__  _.-\   \
*        | |  |  ``/  /`  /
*       /,_|  |   /,_/   /
*          /,_/      '`-'
*/
#include <bits/stdc++.h>
long long power(long long x, long long y){
if (y == 0)
	return 1;
long long ret = power(x , y >> 1) %1000000007 ;
if (y % 2 == 0)
	return (ret * ret) % 1000000007;
else
	return (x * (ret * ret % 1000000007)) % 1000000007;
}

/*
int parent[N];
int groupsize[N];
struct DSU
{

DSU()
{
	for (int i=0;i<N;i++)
	{
		parent[i]=i;
		groupsize[i]=1;

	}
}
int getleader(int i){
if (parent[i]==i)return i;
return parent[i]=getleader(parent[i]);
}

bool samegroup(int x,int y){return getleader(x)==getleader(y);}

void mergegroups(int x,int y){
int leader1=getleader(x);
int leader2=getleader(y);
if (leader1==leader2)return;
if (groupsize[leader1]>groupsize[leader2]){
	parent[leader2]=leader1;
	groupsize[leader1]+=groupsize[leader2];
}
else {
	  parent[leader1]=leader2;
	groupsize[leader2]+=groupsize[leader1];
}

}

int getsize(int x){
return groupsize[getleader(x)];
}

};


*/
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<string> vs;
typedef vector<pair<int,int> > vii;
typedef map<int, int> mii;
typedef map<string, int> msi;
typedef pair<int, int> pii;
#define sfi1(v) scanf("%d",&v)
#define sfi2(v1,v2) scanf("%d %d",&v1,&v2)
#define sfi3(v1,v2,v3) scanf("%d %d %d",&v1,&v2,&v3)
#define sfll1(v) scanf("%I64d",&v);
#define sfll2(v1,v2) scanf("%I64d %I64d",&v1,&v2)
#define sfll3(v1,v2,v3) scanf("%I64d %I64d %I64d",&v1,&v2,&v3)
#define min3(a,b,c)     min(a,min(b,c))
#define max3(a,b,c)     max(a,max(b,c))
#define min4(a,b,c,d)   min(a,min(b,min(c,d)))
#define max4(a,b,c,d)   max(a,max(b,max(c,d)))
#define el	'\n'
#define lp(i,n) for(int i = 0;i < int(n);i++)
#define rlp(i, n) for (int i = (n) - 1; i >= 0; i--)
#define rng(i,a,b) for(int i = int(a);i <= int(b);i++)
#define mp(x,y)  	make_pair((x),(y))
#define pb(x)    	push_back((x))
#define all(v)  	((v).begin()),((v).end())
#define sz(x)  		((int) (x).size())
#define bits(a) 	__builtin_popcountll(a)
#define fr first
#define sc second
#define pii pair<int, int>
#define sortva(v) sort(all(v))
#define sortvd(v) sort(v.rbegin(),v.rend())
#define sortaa(a,n) sort(a,a+n)
#define sortad(a,n) sort(a,a+n),reverse(a,a+n)
#define SS stringstream
#define ll long long
#define clr(x, y) memset(x, y, sizeof(x))
#define foreach(it,x) for(__typeof__((x).begin()) it = (x).begin(); it != (x).end(); ++it)
int dx[] = { 0, 0, 1, -1, 1, -1, 1, -1 };
int dy[] = { 1, -1, 0, 0, -1, 1, 1, -1 };
int kx[] = { 2, 2, 1, -1, -2, -2, 1, -1 };
int ky[] = { 1, -1, 2, 2, 1, -1, -2, -2 };
ll gcd(ll a, ll b){if (a == 0)return b;return gcd(b % a, a);}



void MisSiOn_ImPosSiBlE(){
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

}

ll const N = 3e5+ 9, mod = 1e9+7 , oo = 0x3f3f3f3f;

//------------------------------------------------------------------------------------


ll x;




int main()
{
	int n;
	cin>>n;
	string s;
	cin>>s;
	if (s.size()%2)cout<<"No";
	else{
		int i=s.size()/2;
		int j=i;
		i--;
		while(i>=0&&s[i]==s[j+i])i--;
		if (i==-1)cout<< "Yes";
		else cout<<"No";
	}















	/*
	MisSiOn_ImPosSiBlE();
	int dis[N];
void DijkstraELOGE(int src){
  priority_queue<pair<int, int> > q;
  q.push({0, src});
  memset(dis, OO, sizeof dis);
  dis[src] = 0;
  while(q.size()){
	int u = q.top().second, d = -q.top().first;
	q.pop();
	if(d > dis[u])  continue;
	for(int k = head[u] ; ~k ; k = nxt[k]){
	  int v = to[k], c = cost[k];
	  int dd = d + c;
	  if(dis[v] > dd){
		dis[v] = dd;
		q.push({-dd, v});
	  }
	}
  }
}


/*
*/
return 0;
}


Measured memory_bytes: 256