stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



int main(){

	

	int n,i; cin >> n;

	string s; cin >> s;

	bool b=1;

	

	if (n%2 == 1) b = 0;

	else{

		for (i=0 ; i<n/2 ; i++)

			if (s[i] != s[i+n/2]){

				b = 0; break;

			}

	}

	

	if (b) cout << "Yes\n";

	else cout << "No\n";

	

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.3303175522696575x):
#include <stdio.h>



int main(){

	int idx=0;

	scanf("%d", &idx);

	char str[idx+1];

	scanf("%s", &str);

	if(idx%2==1){

		puts("No");

	}

	else{

		int tanda = 1;

		

		for(int i=0; i < idx/2; i++){

			if(str[i] != str[i + idx/2]){

				tanda = 0;

			}

		}

		if(tanda==1){

			puts("Yes");

		}

		else{

			puts("No");

		}

	}

	

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <string.h>

using namespace std;



int main() {

    ios::sync_with_stdio(false);

    int n;

    cin >> n;

    string s;

    cin >> s;

    if (n % 2 == 1) {

        cout << "No"<<endl;

    } else {

        string s1 = s.substr(0, n / 2);

        string s2 = s.substr(n / 2, n / 2);

        if (s1 == s2) {

            cout << "Yes"<<endl;

        } else {

            cout << "No"<<endl;

        }

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.417888007880338x):
#include <stdio.h>

#include <string.h>



int main(){

	int n;

	scanf("%d", &n);

	

	char str[n+1];

	scanf("%s", &str);

	

	if (n%2!=0){

		printf("No\n");

	}

	else {

		int index=1;

		for (int i=0; i<n/2; i++){

			if (str[i]!=str[i+n/2]){

				index=0;

			}

		}

			if(index){

				printf("Yes\n");

			}

			else{

				printf("No\n");

			}

	}



	return 0;

}
// Slower C++ solution:
/*

*----------------------------------------------

*   Saurabh Srivastava - SAURASS - andha_koder

*----------------------------------------------

*/

#include<bits/stdc++.h>

using namespace std;



typedef long long int ll;



int main() {

    ll n;

    cin >> n;

    string s;

    cin >> s;

    

    ll mid = 0;

    bool flag = false;

	if(n % 2 == 0) {

		mid = n/2;

	

		for(int i = 0; i < mid; i++) {

			if(s[i] == s[mid + i])

				flag = true;

			else {

				flag = false;

				break;

			}

		}

	}



    if(flag)

		cout << "Yes";

	else

		cout << "No";

    

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.280401621329356x):
#include <stdio.h>

#include <string.h>



int main(){

	int n;

	scanf("%d", &n);

	

	char str[n+1];

	scanf("%s", &str);

	

	if (n%2!=0){

		printf("No\n");

	}

	else {

		int index=1;

		for (int i=0; i<n/2; i++){

			if (str[i]!=str[i+n/2]){

				index=0;

			}

		}

			if(index){

				printf("Yes\n");

			}

			else{

				printf("No\n");

			}

	}



	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



int main(){

	

	int n,i; cin >> n;

	string s; cin >> s;

	bool b=1;

	

	if (n%2 == 1) b = 0;

	else{

		for (i=0 ; i<n/2 ; i++)

			if (s[i] != s[i+n/2]){

				b = 0; break;

			}

	}

	

	if (b) cout << "Yes\n";

	else cout << "No\n";

	

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.322691513901038x):
#include <stdio.h>

#include <string.h>



int main(){

	int n;

	scanf("%d", &n);

	

	char str[n+1];

	scanf("%s", &str);

	

	if (n%2!=0){

		printf("No\n");

	}

	else {

		int index=1;

		for (int i=0; i<n/2; i++){

			if (str[i]!=str[i+n/2]){

				index=0;

			}

		}

			if(index){

				printf("Yes\n");

			}

			else{

				printf("No\n");

			}

	}



	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <string.h>

using namespace std;



int main() {

    ios::sync_with_stdio(false);

    int n;

    cin >> n;

    string s;

    cin >> s;

    if (n % 2 == 1) {

        cout << "No"<<endl;

    } else {

        string s1 = s.substr(0, n / 2);

        string s2 = s.substr(n / 2, n / 2);

        if (s1 == s2) {

            cout << "Yes"<<endl;

        } else {

            cout << "No"<<endl;

        }

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.427143907557222x):
#include <stdio.h>



int main (){

	int n; 

	scanf("%d", &n);

	char str[n + 1];

	scanf("%s", str);

	if(n % 2 == 1){

		puts("No");

	} else{

		int temp = 1;

		for(int i = 0; i < n / 2; i++){

			if(str[i] != str[i + n / 2]){

				temp = 0;

			}

		}

		if (temp){

			puts("Yes");

		}else{

			puts("No");

		}

	}

	return 0;

}
// Slower C++ solution:
/*

*----------------------------------------------

*   Saurabh Srivastava - SAURASS - andha_koder

*----------------------------------------------

*/

#include<bits/stdc++.h>

using namespace std;



typedef long long int ll;



int main() {

    ll n;

    cin >> n;

    string s;

    cin >> s;

    

    ll mid = 0;

    bool flag = false;

	if(n % 2 == 0) {

		mid = n/2;

	

		for(int i = 0; i < mid; i++) {

			if(s[i] == s[mid + i])

				flag = true;

			else {

				flag = false;

				break;

			}

		}

	}



    if(flag)

		cout << "Yes";

	else

		cout << "No";

    

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.289422639775953x):
#include <stdio.h>



int main (){

	int n; 

	scanf("%d", &n);

	char str[n + 1];

	scanf("%s", str);

	if(n % 2 == 1){

		puts("No");

	} else{

		int temp = 1;

		for(int i = 0; i < n / 2; i++){

			if(str[i] != str[i + n / 2]){

				temp = 0;

			}

		}

		if (temp){

			puts("Yes");

		}else{

			puts("No");

		}

	}

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



int main(){

	

	int n,i; cin >> n;

	string s; cin >> s;

	bool b=1;

	

	if (n%2 == 1) b = 0;

	else{

		for (i=0 ; i<n/2 ; i++)

			if (s[i] != s[i+n/2]){

				b = 0; break;

			}

	}

	

	if (b) cout << "Yes\n";

	else cout << "No\n";

	

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.331784780242463x):
#include <stdio.h>



int main (){

	int n; 

	scanf("%d", &n);

	char str[n + 1];

	scanf("%s", str);

	if(n % 2 == 1){

		puts("No");

	} else{

		int temp = 1;

		for(int i = 0; i < n / 2; i++){

			if(str[i] != str[i + n / 2]){

				temp = 0;

			}

		}

		if (temp){

			puts("Yes");

		}else{

			puts("No");

		}

	}

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <string.h>

using namespace std;



int main() {

    ios::sync_with_stdio(false);

    int n;

    cin >> n;

    string s;

    cin >> s;

    if (n % 2 == 1) {

        cout << "No"<<endl;

    } else {

        string s1 = s.substr(0, n / 2);

        string s2 = s.substr(n / 2, n / 2);

        if (s1 == s2) {

            cout << "Yes"<<endl;

        } else {

            cout << "No"<<endl;

        }

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.427143907557222x):
#include <stdio.h>

int main(){

	int N;

	scanf ("%d", &N);



	char S[N + 1];

	scanf ("%s", &S);

	

	if (N % 2 == 1){

		puts ("No");

	}

	else {

		int flag = 1;

		for (int i = 0; i < N/2; i++){

			if (S[i] != S[i + N/2]){

			flag = 0;	

			}

			}

	if (flag){

		puts ("Yes");

	}

	else {

		puts ("No");

	}

}

	return 0;

}
// Slower C++ solution:
/*

*----------------------------------------------

*   Saurabh Srivastava - SAURASS - andha_koder

*----------------------------------------------

*/

#include<bits/stdc++.h>

using namespace std;



typedef long long int ll;



int main() {

    ll n;

    cin >> n;

    string s;

    cin >> s;

    

    ll mid = 0;

    bool flag = false;

	if(n % 2 == 0) {

		mid = n/2;

	

		for(int i = 0; i < mid; i++) {

			if(s[i] == s[mid + i])

				flag = true;

			else {

				flag = false;

				break;

			}

		}

	}



    if(flag)

		cout << "Yes";

	else

		cout << "No";

    

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.289422639775953x):
#include <stdio.h>

int main(){

	int N;

	scanf ("%d", &N);



	char S[N + 1];

	scanf ("%s", &S);

	

	if (N % 2 == 1){

		puts ("No");

	}

	else {

		int flag = 1;

		for (int i = 0; i < N/2; i++){

			if (S[i] != S[i + N/2]){

			flag = 0;	

			}

			}

	if (flag){

		puts ("Yes");

	}

	else {

		puts ("No");

	}

}

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



int main(){

	

	int n,i; cin >> n;

	string s; cin >> s;

	bool b=1;

	

	if (n%2 == 1) b = 0;

	else{

		for (i=0 ; i<n/2 ; i++)

			if (s[i] != s[i+n/2]){

				b = 0; break;

			}

	}

	

	if (b) cout << "Yes\n";

	else cout << "No\n";

	

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.331784780242463x):
#include <stdio.h>

int main(){

	int N;

	scanf ("%d", &N);



	char S[N + 1];

	scanf ("%s", &S);

	

	if (N % 2 == 1){

		puts ("No");

	}

	else {

		int flag = 1;

		for (int i = 0; i < N/2; i++){

			if (S[i] != S[i + N/2]){

			flag = 0;	

			}

			}

	if (flag){

		puts ("Yes");

	}

	else {

		puts ("No");

	}

}

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <string.h>

using namespace std;



int main() {

    ios::sync_with_stdio(false);

    int n;

    cin >> n;

    string s;

    cin >> s;

    if (n % 2 == 1) {

        cout << "No"<<endl;

    } else {

        string s1 = s.substr(0, n / 2);

        string s2 = s.substr(n / 2, n / 2);

        if (s1 == s2) {

            cout << "Yes"<<endl;

        } else {

            cout << "No"<<endl;

        }

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.427685514582438x):
#include<stdio.h>



int main(){

 int n;

 scanf("%d", &n);

 char arr[n+1];

 scanf("%s", arr);

 

 if (n%2==1){

 

 puts("No");

}

else{

 int flag = 1;

 

 for ( int i =0; i<n/2; i++){

 if(arr[i]!= arr[i+n/2]){

 

 flag=0;

}

}

if (flag){

 puts("Yes");

}

else{

 puts("No");

}

}

 return 0;

}
// Slower C++ solution:
/*

*----------------------------------------------

*   Saurabh Srivastava - SAURASS - andha_koder

*----------------------------------------------

*/

#include<bits/stdc++.h>

using namespace std;



typedef long long int ll;



int main() {

    ll n;

    cin >> n;

    string s;

    cin >> s;

    

    ll mid = 0;

    bool flag = false;

	if(n % 2 == 0) {

		mid = n/2;

	

		for(int i = 0; i < mid; i++) {

			if(s[i] == s[mid + i])

				flag = true;

			else {

				flag = false;

				break;

			}

		}

	}



    if(flag)

		cout << "Yes";

	else

		cout << "No";

    

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.28995050277532x):
#include<stdio.h>



int main(){

 int n;

 scanf("%d", &n);

 char arr[n+1];

 scanf("%s", arr);

 

 if (n%2==1){

 

 puts("No");

}

else{

 int flag = 1;

 

 for ( int i =0; i<n/2; i++){

 if(arr[i]!= arr[i+n/2]){

 

 flag=0;

}

}

if (flag){

 puts("Yes");

}

else{

 puts("No");

}

}

 return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



int main(){

	

	int n,i; cin >> n;

	string s; cin >> s;

	bool b=1;

	

	if (n%2 == 1) b = 0;

	else{

		for (i=0 ; i<n/2 ; i++)

			if (s[i] != s[i+n/2]){

				b = 0; break;

			}

	}

	

	if (b) cout << "Yes\n";

	else cout << "No\n";

	

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.332316870812219x):
#include<stdio.h>



int main(){

 int n;

 scanf("%d", &n);

 char arr[n+1];

 scanf("%s", arr);

 

 if (n%2==1){

 

 puts("No");

}

else{

 int flag = 1;

 

 for ( int i =0; i<n/2; i++){

 if(arr[i]!= arr[i+n/2]){

 

 flag=0;

}

}

if (flag){

 puts("Yes");

}

else{

 puts("No");

}

}

 return 0;

}
// Slower C++ solution:
#include <iostream>

#include <string.h>

using namespace std;



int main() {

    ios::sync_with_stdio(false);

    int n;

    cin >> n;

    string s;

    cin >> s;

    if (n % 2 == 1) {

        cout << "No"<<endl;

    } else {

        string s1 = s.substr(0, n / 2);

        string s2 = s.substr(n / 2, n / 2);

        if (s1 == s2) {

            cout << "Yes"<<endl;

        } else {

            cout << "No"<<endl;

        }

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.427143907557222x):
#include<stdio.h>



int main(){

 int n;

 scanf("%d", &n);

 char str[n+1];

 scanf("%s", str);

 

 if (n%2==1){

 

 puts("No");

}

else{

 int flag = 1;

 

 for ( int i =0; i<n/2; i++){

 if(str[i]!= str[i+n/2]){

 

 flag=0;

}

}

if (flag){

 puts("Yes");

}

else{

 puts("No");

}

}

 return 0;

}
// Slower C++ solution:
/*

*----------------------------------------------

*   Saurabh Srivastava - SAURASS - andha_koder

*----------------------------------------------

*/

#include<bits/stdc++.h>

using namespace std;



typedef long long int ll;



int main() {

    ll n;

    cin >> n;

    string s;

    cin >> s;

    

    ll mid = 0;

    bool flag = false;

	if(n % 2 == 0) {

		mid = n/2;

	

		for(int i = 0; i < mid; i++) {

			if(s[i] == s[mid + i])

				flag = true;

			else {

				flag = false;

				break;

			}

		}

	}



    if(flag)

		cout << "Yes";

	else

		cout << "No";

    

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.289422639775953x):
#include<stdio.h>



int main(){

 int n;

 scanf("%d", &n);

 char str[n+1];

 scanf("%s", str);

 

 if (n%2==1){

 

 puts("No");

}

else{

 int flag = 1;

 

 for ( int i =0; i<n/2; i++){

 if(str[i]!= str[i+n/2]){

 

 flag=0;

}

}

if (flag){

 puts("Yes");

}

else{

 puts("No");

}

}

 return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



int main(){

	

	int n,i; cin >> n;

	string s; cin >> s;

	bool b=1;

	

	if (n%2 == 1) b = 0;

	else{

		for (i=0 ; i<n/2 ; i++)

			if (s[i] != s[i+n/2]){

				b = 0; break;

			}

	}

	

	if (b) cout << "Yes\n";

	else cout << "No\n";

	

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.331784780242463x):
#include<stdio.h>



int main(){

 int n;

 scanf("%d", &n);

 char str[n+1];

 scanf("%s", str);

 

 if (n%2==1){

 

 puts("No");

}

else{

 int flag = 1;

 

 for ( int i =0; i<n/2; i++){

 if(str[i]!= str[i+n/2]){

 

 flag=0;

}

}

if (flag){

 puts("Yes");

}

else{

 puts("No");

}

}

 return 0;

}
// Slower C++ solution:
#include <iostream>

#include <string.h>

using namespace std;



int main() {

    ios::sync_with_stdio(false);

    int n;

    cin >> n;

    string s;

    cin >> s;

    if (n % 2 == 1) {

        cout << "No"<<endl;

    } else {

        string s1 = s.substr(0, n / 2);

        string s2 = s.substr(n / 2, n / 2);

        if (s1 == s2) {

            cout << "Yes"<<endl;

        } else {

            cout << "No"<<endl;

        }

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.416340748365588x):
#include <stdio.h>

#include <string.h>

int main(){

int n;

scanf("%d",&n);

char chara[n];

scanf("%s",chara);

int len=strlen(chara);

if(len%2){

	printf("No");

	return 0;

}

else{

	for (int i=0;i<len/2;i++){

		if(chara[i]!=chara[i+(len/2)]){

			printf("No");

			return 0;

		}

		else{

			continue;

		}

	}

}

printf("Yes");

return 0;

}
// Slower C++ solution:
/*

*----------------------------------------------

*   Saurabh Srivastava - SAURASS - andha_koder

*----------------------------------------------

*/

#include<bits/stdc++.h>

using namespace std;



typedef long long int ll;



int main() {

    ll n;

    cin >> n;

    string s;

    cin >> s;

    

    ll mid = 0;

    bool flag = false;

	if(n % 2 == 0) {

		mid = n/2;

	

		for(int i = 0; i < mid; i++) {

			if(s[i] == s[mid + i])

				flag = true;

			else {

				flag = false;

				break;

			}

		}

	}



    if(flag)

		cout << "Yes";

	else

		cout << "No";

    

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.278893625660488x):
#include <stdio.h>

#include <string.h>

int main(){

int n;

scanf("%d",&n);

char chara[n];

scanf("%s",chara);

int len=strlen(chara);

if(len%2){

	printf("No");

	return 0;

}

else{

	for (int i=0;i<len/2;i++){

		if(chara[i]!=chara[i+(len/2)]){

			printf("No");

			return 0;

		}

		else{

			continue;

		}

	}

}

printf("Yes");

return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



int main(){

	

	int n,i; cin >> n;

	string s; cin >> s;

	bool b=1;

	

	if (n%2 == 1) b = 0;

	else{

		for (i=0 ; i<n/2 ; i++)

			if (s[i] != s[i+n/2]){

				b = 0; break;

			}

	}

	

	if (b) cout << "Yes\n";

	else cout << "No\n";

	

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.321171440935894x):
#include <stdio.h>

#include <string.h>

int main(){

int n;

scanf("%d",&n);

char chara[n];

scanf("%s",chara);

int len=strlen(chara);

if(len%2){

	printf("No");

	return 0;

}

else{

	for (int i=0;i<len/2;i++){

		if(chara[i]!=chara[i+(len/2)]){

			printf("No");

			return 0;

		}

		else{

			continue;

		}

	}

}

printf("Yes");

return 0;

}
// Slower C++ solution:
#include <iostream>

#include <string.h>

using namespace std;



int main() {

    ios::sync_with_stdio(false);

    int n;

    cin >> n;

    string s;

    cin >> s;

    if (n % 2 == 1) {

        cout << "No"<<endl;

    } else {

        string s1 = s.substr(0, n / 2);

        string s2 = s.substr(n / 2, n / 2);

        if (s1 == s2) {

            cout << "Yes"<<endl;

        } else {

            cout << "No"<<endl;

        }

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.418173627720858x):
#include <stdio.h>

#include <string.h>



int main() {

  int n;

  scanf("%d", &n);



  char s[n];

  scanf("%s", s);



  if(n % 2 == 1) {

    printf("No");

  }



  else {

    int len = strlen(s);

    int flag = 0;

    for(int i = 0; i < len / 2; i++) {

      if(s[i] != s[i + len / 2]) {

        flag = 1;

        break;

      }

    }



    if(!flag) printf ("Yes");

    else printf("No");

  }



  return 0;

}
// Slower C++ solution:
/*

*----------------------------------------------

*   Saurabh Srivastava - SAURASS - andha_koder

*----------------------------------------------

*/

#include<bits/stdc++.h>

using namespace std;



typedef long long int ll;



int main() {

    ll n;

    cin >> n;

    string s;

    cin >> s;

    

    ll mid = 0;

    bool flag = false;

	if(n % 2 == 0) {

		mid = n/2;

	

		for(int i = 0; i < mid; i++) {

			if(s[i] == s[mid + i])

				flag = true;

			else {

				flag = false;

				break;

			}

		}

	}



    if(flag)

		cout << "Yes";

	else

		cout << "No";

    

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.28067999317218x):
#include <stdio.h>

#include <string.h>



int main() {

  int n;

  scanf("%d", &n);



  char s[n];

  scanf("%s", s);



  if(n % 2 == 1) {

    printf("No");

  }



  else {

    int len = strlen(s);

    int flag = 0;

    for(int i = 0; i < len / 2; i++) {

      if(s[i] != s[i + len / 2]) {

        flag = 1;

        break;

      }

    }



    if(!flag) printf ("Yes");

    else printf("No");

  }



  return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



int main(){

	

	int n,i; cin >> n;

	string s; cin >> s;

	bool b=1;

	

	if (n%2 == 1) b = 0;

	else{

		for (i=0 ; i<n/2 ; i++)

			if (s[i] != s[i+n/2]){

				b = 0; break;

			}

	}

	

	if (b) cout << "Yes\n";

	else cout << "No\n";

	

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.322972115179456x):
#include <stdio.h>

#include <string.h>



int main() {

  int n;

  scanf("%d", &n);



  char s[n];

  scanf("%s", s);



  if(n % 2 == 1) {

    printf("No");

  }



  else {

    int len = strlen(s);

    int flag = 0;

    for(int i = 0; i < len / 2; i++) {

      if(s[i] != s[i + len / 2]) {

        flag = 1;

        break;

      }

    }



    if(!flag) printf ("Yes");

    else printf("No");

  }



  return 0;

}
// Slower C++ solution:
#include <iostream>

#include <string.h>

using namespace std;



int main() {

    ios::sync_with_stdio(false);

    int n;

    cin >> n;

    string s;

    cin >> s;

    if (n % 2 == 1) {

        cout << "No"<<endl;

    } else {

        string s1 = s.substr(0, n / 2);

        string s2 = s.substr(n / 2, n / 2);

        if (s1 == s2) {

            cout << "Yes"<<endl;

        } else {

            cout << "No"<<endl;

        }

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.41755702304392x):
#include <stdio.h>



int main(){

    int n;

    scanf("%d", &n);

    char str[n+1];

    scanf("%s", str);

    int flag = 1;

    if(n%2 != 0){

        flag = 0;

    }

    else{

        for(int i = 0, j=n/2;  i<n/2; i++, j++){

            if(str[i] != str[j]){

                flag = 0;

                break;

            }

        }

    }

    

    flag ? printf("Yes\n") : printf("No\n");

    

    return 0;

}
// Slower C++ solution:
/*

*----------------------------------------------

*   Saurabh Srivastava - SAURASS - andha_koder

*----------------------------------------------

*/

#include<bits/stdc++.h>

using namespace std;



typedef long long int ll;



int main() {

    ll n;

    cin >> n;

    string s;

    cin >> s;

    

    ll mid = 0;

    bool flag = false;

	if(n % 2 == 0) {

		mid = n/2;

	

		for(int i = 0; i < mid; i++) {

			if(s[i] == s[mid + i])

				flag = true;

			else {

				flag = false;

				break;

			}

		}

	}



    if(flag)

		cout << "Yes";

	else

		cout << "No";

    

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.280079035690024x):
#include <stdio.h>



int main(){

    int n;

    scanf("%d", &n);

    char str[n+1];

    scanf("%s", str);

    int flag = 1;

    if(n%2 != 0){

        flag = 0;

    }

    else{

        for(int i = 0, j=n/2;  i<n/2; i++, j++){

            if(str[i] != str[j]){

                flag = 0;

                break;

            }

        }

    }

    

    flag ? printf("Yes\n") : printf("No\n");

    

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



int main(){

	

	int n,i; cin >> n;

	string s; cin >> s;

	bool b=1;

	

	if (n%2 == 1) b = 0;

	else{

		for (i=0 ; i<n/2 ; i++)

			if (s[i] != s[i+n/2]){

				b = 0; break;

			}

	}

	

	if (b) cout << "Yes\n";

	else cout << "No\n";

	

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.322366344724882x):
#include <stdio.h>



int main(){

    int n;

    scanf("%d", &n);

    char str[n+1];

    scanf("%s", str);

    int flag = 1;

    if(n%2 != 0){

        flag = 0;

    }

    else{

        for(int i = 0, j=n/2;  i<n/2; i++, j++){

            if(str[i] != str[j]){

                flag = 0;

                break;

            }

        }

    }

    

    flag ? printf("Yes\n") : printf("No\n");

    

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <string.h>

using namespace std;



int main() {

    ios::sync_with_stdio(false);

    int n;

    cin >> n;

    string s;

    cin >> s;

    if (n % 2 == 1) {

        cout << "No"<<endl;

    } else {

        string s1 = s.substr(0, n / 2);

        string s2 = s.substr(n / 2, n / 2);

        if (s1 == s2) {

            cout << "Yes"<<endl;

        } else {

            cout << "No"<<endl;

        }

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.418360350885189x):
#include <stdio.h>

int main (){

	int n, A = 1;

	scanf("%d", &n);

	char s[n + 1];

	scanf("%s", s);

	if(n % 2 == 1){

		A = 0;

	}else{

		int temp = (n / 2) + 1;

		for(int i = 0 ; i < n / 2 ;i++){

			if(s[i] != s[i + (n / 2)]){

				A = 0;

				break;

			}

		}

	}

	if(A == 1){

		printf ("Yes");

	}else{

		printf ("No");

	}

	return 0;

}