stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#include<stdio.h>  

#include<string.h>  

#include<algorithm>  

#define INF 0xfffffff  

using namespace std;  

int map[1100][1100];  

int main()  

{  

    int n,m,k,i,j,a,b,c,sum1;  

    while(scanf("%d",&n),n)  

    {  

        for(i=0;i<1100;i++)  

        for(j=0;j<1100;j++)  

        {  

            map[i][j]=INF;  

            map[i][i]=0;  

        }  

        int Max=0;  

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

        {  

            scanf("%d%d%d",&a,&b,&c);  

            Max=max(Max,a);  

            Max=max(Max,b);  

            map[a][b]=c;  

            map[b][a]=c;  

        }  

        for(k=0;k<=Max;k++)  

        for(i=0;i<=Max;i++)  

        for(j=0;j<=Max;j++)  

        {  

            if(map[i][j]>map[i][k]+map[k][j])  

            map[i][j]=map[i][k]+map[k][j];  

        }  

        int sum=INF;  

        int ans=0;  

        for(i=0;i<=Max;i++)  

        {  

            sum1=0;  

            for(j=0;j<=Max;j++)  

            {  

               sum1+=map[i][j];  

            }  

            if(sum1<sum)  

            {  

                sum=sum1;  

                ans=i;  

            }  

        }  

        printf("%d %d\n",ans,sum);  

    }  

    return 0;  

}  

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<algorithm>

#include<string.h>

using namespace std;

int main()

{

	int t,map[12][12],sum,ans,s,i,j,k,max0,a,b,c;

	while(scanf("%d",&t) && t)

	{

		memset(map,1,sizeof(map));

		max0=0;

		for(i=0;i<t;i++)

		{

			scanf("%d %d %d",&a,&b,&c);

			map[a][b]=map[b][a]=c;

			max0=max(max0,max(a,b));

		}

	/*	printf("%d\n\n",max0);

		 for(i=0;i<=max0;i++)

		 {

		 	for(j=0;j<=max0;j++)

		 	{

		 		printf("%d  ",map[i][j]);

		 		if(j == max0)

		 			printf("\n");

			 }

		 }*/

		for(k=0;k<=max0;k++)

		{

			for(i=0;i<=max0;i++)

			{

				for(j=0;j<=max0;j++)

				{

					map[i][j]=min(map[i][j],map[i][k]+map[k][j]);

				}

			}

		}

		sum=10000000,ans=0;

		for(i=0;i<=max0;i++)

		{

			s=0;

			for(j=0;j<=max0;j++)

			{

				if(i != j)

				{

					s+=map[i][j];

				}

			}

			if(s < sum)

			{

				sum=s;

				ans=i;

			}

		}

		printf("%d %d\n",ans,sum);

	}

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<map>

#include<set>

#include<list>

#include<queue>

#include<cmath>

#include<string>

#include<iomanip>

#include<algorithm>

using namespace std;



int main()

{

	long long num;

	int cnt1,cnt2,temp,k,MAX,MIN = 99;//最大位数99 

	cin >> num;

	int t = sqrt(num);

	for(int i = t;i >= 1;i--)

	{

		if(num%i == 0)

		{

			k = i;

			cnt1 = 0;//记录位数 

			cnt2 = 0;

			MAX = 0;//记录本次位数最大 

			temp = num/i;

			while(k)

			{

				k /= 10;

				cnt1++;

			}

			while(temp)

			{

				temp /= 10;

				cnt2++;

			}

			MAX = max(cnt1,cnt2);//每次中的最大 

			MIN = min(MAX,MIN);	//每次保留最大中的最小	

		}	

	}

	cout << MIN << endl;

	return 0; 

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cmath>

using namespace std;

long long n,ans;

int s;

int main(){

    scanf("%lld",&n);

    for(int i=sqrt(n);i>0;--i)

        if(n%i==0){

            ans=n/i;

            break;

        }

    while(ans>0){

        ++s;

        ans/=10;

    }

    printf("%d\n",s);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<map>

#include<cmath>

#include<stack>

#include<cstdio>

#include<queue>

#include<vector>

#include<cstring>

#include<iostream>

#include<algorithm>

using namespace std;

typedef long long ll;

ll n,minx=1ll<<32ll;

ll work(ll x,ll y){

    int s=0,c=0;

    while(x){

        x/=10;

        s++;

    }

    while(y){

        y/=10;

        c++;

    }

    return max(s,c);

}

int main(){

	scanf("%lld",&n);

	for(ll i=1;i*i<=n;i++){

        if(n%i==0)minx=min(minx,work(i,n/i));

	}

	printf("%lld\n",minx);

	return 0;

}


// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cmath>

int main()

{

    long long n;

    scanf("%lld",&n);

    int a=int(sqrt(n));

    while(n%a)

        a=a-1;

    a=n/a;

    int s=0;

    while(a>0)

        s=s+1,a/=10;

    printf("%d\n",s);

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

long long n;

int main(){

    cin>>n;

    for(int i=sqrt(n);i>=1;i--)

        if(n%i==0){

            int t=i,l=n/i,s=1;

            while(l>=10) s++,l/=10;

            return cout<<s<<endl,0;

        }

    return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cmath>

int main()

{

    long long n;

    scanf("%lld",&n);

    int a=int(sqrt(n));

    while(n%a)

        a=a-1;

    a=n/a;

    int s=0;

    while(a>0)

        s=s+1,a/=10;

    printf("%d\n",s);

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

long long int F(long long int a,long long int b)

{

	int ta=0,tb=0;

	while(a>0)

	{

		a/=10;

		ta++;

	}

	while(b>0)

	{

		b/=10;

		tb++;

	}

	return ta>ta ? ta : tb;

}

int main()

{

	long long int n;

	cin>>n;

	long long int a,b,min=0x7fffffff;

	for(int i=1;i<=sqrt(n);i++)

	{

		if(n%i!=0)

		{

			continue;

		}

		a=i;

		b=n/i;

		if(F(a,b)<min)

		{

			min=F(a,b);

		}

	}

	cout<<min;

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cmath>

int main()

{

    long long n;

    scanf("%lld",&n);

    int a=int(sqrt(n));

    while(n%a)

        a=a-1;

    a=n/a;

    int s=0;

    while(a>0)

        s=s+1,a/=10;

    printf("%d\n",s);

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

using namespace std;

int main()

{

	long long i,j,ans=11,k,n,p;

	cin>>n;	

	for(i=1;i*i<=n;i++)

	{

		if(n%i==0)

		{

			j=n/i;

			p=j;

			k=0;

			while(p>0)

			{

				p=p/10;

				k++;

			}

			if(k<ans)

			{

				ans=k;

			}

		}

	}

	cout<<ans<<endl;

	return 0;

} 

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cmath>

int main()

{

    long long n;

    scanf("%lld",&n);

    int a=int(sqrt(n));

    while(n%a)

        a=a-1;

    a=n/a;

    int s=0;

    while(a>0)

        s=s+1,a/=10;

    printf("%d\n",s);

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<cstdio> 

#include<cmath>

#include<iostream>

using namespace std;

long long n,ans; 

int s;

int main()

{

    cin>>n;

    for(int i=sqrt(n);i>0;--i) 

    if(n%i==0)

	{

        ans=n/i;

        break;

    }

    while(ans>0)

	{

        ++s;

        ans/=10;

    }

    cout<<s<<endl;

    return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cmath>

int main()

{

    long long n;

    scanf("%lld",&n);

    int a=int(sqrt(n));

    while(n%a)

        a=a-1;

    a=n/a;

    int s=0;

    while(a>0)

        s=s+1,a/=10;

    printf("%d\n",s);

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

typedef long long LL; //打板子留下的习惯~

LL n;

char s[11],s2[11]; //存储i 和 n / i,便于计算位数

int main()

{

    cin >> n;

    for (int i = sqrt(n); i >= 1; -- i) //正方形的启发

    {

        if (n % i == 0)

        {

            int i2 = n / i; //存储n / i

            sprintf(s,"%d",i);

            sprintf(s2,"%d",i2);//写入字符串

            cout << max(strlen(s),strlen(s2)) << endl; //strlen()函数直接搞定位数问题

            break;//由于从大到小枚举因数，故找到的一定是最优解，找到一组解直接跳循环

        }

    }

    return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>//输入输出要用的文件。 

#include<cmath>//sqrt要用的文件。 

using namespace std;

long long n,ans;//10的10次方超int。 

int s;

int main(){

    scanf("%lld",&n);//long long的scanf要用lld。 

    for(int i=sqrt(n);i>0;--i) //从平方根开始搜索，用n除以搜到的第一个数，计算出它的位数就是答案。 

        if(n%i==0){

            ans=n/i;

            break;

        }

    while(ans>0)

    {//计算位数。 

        ++s;

        ans/=10;

    }

    printf("%d\n",s);//s为int型变量。 

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<math.h>

using namespace std;

int main()

{

	long long int a,za,shu,s=0;

	cin>>a;

	za=sqrt(a);

	for(int i=za;i>0;--i)

	{

		if(a%i==0)

		{

			shu=a/i;

			break;

		}

	}

	while(shu>0)

	{

		++s;

		shu/=10;

	}

	cout<<s<<endl;

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>//输入输出要用的文件。 

#include<cmath>//sqrt要用的文件。 

using namespace std;

long long n,ans;//10的10次方超int。 

int s;

int main(){

    scanf("%lld",&n);//long long的scanf要用lld。 

    for(int i=sqrt(n);i>0;--i) //从平方根开始搜索，用n除以搜到的第一个数，计算出它的位数就是答案。 

        if(n%i==0){

            ans=n/i;

            break;

        }

    while(ans>0)

    {//计算位数。 

        ++s;

        ans/=10;

    }

    printf("%d\n",s);//s为int型变量。 

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

long long n,s,ans; 

int main(){

    cin>>n; 

    for(int i=sqrt(n);i;i--) 

        if(n%i==0){

            s=n/i;

            break;

        }

    while(s){ 

        ans++;

        s/=10;

    }

    cout<<ans<<endl;

    return 0;

} 

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cmath> 

using namespace std;

long long n,ans;

int s;

int main(){

    scanf("%lld",&n);

    for(int i=sqrt(n);i>0;--i)

        if(n%i==0){

            ans=n/i;

            break;

        }

    while(ans>0){

        ++s;

        ans/=10;

    }

    printf("%d\n",s); 

    return 0;

}	 

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

long long d,f;

int main() {

	long long n,i;

	cin>>n;

	i=sqrt(n)+1;

	while(i>=1) {

		i-=1;

		if((double)n/i==floor((double)(n/i)) && (double)n/i==ceil((double)(n/i))) {

			long long x=i,y=n/i;

			while(x!=0) {

				d++;

				x/=10;

			}

			while(y!=0) {

				f++;

				y/=10;

			}

			cout<<max(d,f);

			return 0;

		}

	}

	return 0;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cmath> 

using namespace std;

long long n,ans;

int s;

int main(){

    scanf("%lld",&n); 

    for(int i=sqrt(n);i>0;--i)

        if(n%i==0){

            ans=n/i;

            break;

        }

    while(ans>0){

        ++s;

        ans/=10;

    }

    printf("%d\n",s);

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;



int main() {

  int64_t N;

  cin >> N;



  int64_t A, B; 

  int length = 100000;

  

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

  

  if ( N % (i+1) == 0) {

	A = i+1;

    B = N / (i+1);

    string s = to_string(A); int A_length = s.size();

    string t = to_string(B); int B_length = t.size();

    length = min(length, max(A_length,B_length));

  }

  else continue;

    

  }

  

  cout << length << endl;

}


// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

using namespace std;



 int cnt_digits(int64_t N){

 int digits=0;



 while(N>0){

 N/=10;

 digits++;

 }



 return digits;

 }



int main() {

  int64_t N;

  cin >> N;

  

 int ans=cnt_digits(N); 



 for(int64_t A=1;A*A<=N;++A){

 if(N%A!=0) continue;

 int64_t B=N/A;



 int cur=max(cnt_digits(A),cnt_digits(B));



 if(ans>cur){

 ans=cur;

 }

   

 }

  

  cout << ans << endl;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

long long n;

int main(){

    cin>>n;

    for(int i=sqrt(n);i>=1;i--)

    {

        if(n%i==0){

            int l=n/i;

            int s=1;

            while(l>=10){

                s++;

                l/=10;

            }

        cout<<s;

        return 0;

        }

    }

}

// Optimized solution to the same problem (faster):
#include<cstdio>//输入输出要用的文件。 

#include<cmath>//sqrt要用的文件。 

using namespace std;

long long n,ans;//10的10次方超int。 

int s;

int main(){

    scanf("%lld",&n);//long long的scanf要用lld。 

    for(int i=sqrt(n);i>0;--i) //从平方根开始搜索，用n除以搜到的第一个数，计算出它的位数就是答案。 

        if(n%i==0){

            ans=n/i;

            break;

        }

    while(ans>0){//计算位数。 

        ++s;

        ans/=10;

    }

    printf("%d\n",s);//s为int型变量。 

    return 0;

}//完美结束。 

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int main()

{

    long long n,ans,sum=0;

    cin>>n;

    for(int i=sqrt(n);i>=0;i--)

    {

        if(n%i==0)

        {

            ans=n/i;

            break;

        }

    }

    while(ans)

    {

        sum++;

        ans=ans/10;

    }

    cout<<sum<<endl;

    return 0;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<stdlib.h>

#include<math.h>

typedef long long ll;

bool isPrime(ll n);

int count(ll n);

int main(void)

{

	ll n;

	scanf("%lld", &n);

	if (isPrime(n))

		printf("%d\n", count(n));

	else

	{

		for (int i = sqrt(n); i >= 1; i--)

			if (n % i == 0) {

				int a = count(i), b = count(n / i);

				printf("%d\n", a > b ? a : b);

				break;

			}

	}

	return 0;

}

bool isPrime(ll n)

{

	if (n < 5)return n == 2 || n == 3 ? true : false;

	if ((n + 1) % 6 != 0 && (n - 1) % 6 != 0)return false;

	if (n % 2 == 0)return false;

	for (int i = 3; i <= sqrt(n); i += 2)

		if (n % i == 0)

			return false;

	return true;

}

int count(ll n)

{

	int cnt = 0;

	while (n)

		n /= 10, cnt++;

	return cnt;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#pragma GCC optimize ("O3")

#include <bits/stdc++.h>

using namespace std;

#define MuhammedAly ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

#define all(x) (x).begin(),(x).end()

#define allr(x) (x).rbegin(),(x).rend()

#define pb push_back

#define eb emplace_back

#define popc(x) __builtin_popcount(x)

#define LLMX 1e18

#define NotinRange(n,m) i<0||i>=(n)||j<0||j>=(m)

#define mem(x,y) memset((x),(y),sizeof (x))

#define sz(a) (int)(a).size()

#define inFile(s) freopen((s),"r",stdin)

#define	outFile(s) freopen((s),"w",stdout)

#define biEdge(v, a, b) (v)[(a)].pb((b)), (v)[(b)].pb((a))

#define pi (2 * acos(0))

#define X real()

#define Y imag()

#define cross(a, b) ((conj(a) * (b)).Y)

#define dot(a, b) ((conj(a) * (b)).X)

#define vec(a,b) ((b) - (a))

#define ll long long

typedef long double ld;

typedef complex<double>point;

typedef tuple<int, int, int> line;

typedef pair<point, point>segment;

typedef vector<point>polygon;

const int N = 1e5 + 5, M = 20 + 5, OO = 0x3f3f3f3f, mod = 1e9 + 7, base = 131, mod2 = 1000136437, mod3 = 998244353;

const double EPS = 1e-9;

ll n;

int ans = OO;



int get(int a, int b)

{

    int cnt1 = 0, cnt2 = 0;

    while(a)

        a /= 10, cnt1++;

    while(b)

        b /= 10, cnt2++;

    return max(cnt1, cnt2);

}

int main()

{

    MuhammedAly

    cin >> n;

    for(int i = 1 ; i <= sqrt(n) ; i++)

    {

        if(n % i == 0)

        {

            ans = min(ans, get(i, n / i));

        }

    }

    cout << ans;

    return 0;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<stdlib.h>

#include<math.h>

typedef long long ll;

bool isPrime(ll n);

int count(ll n);

int main(void)

{

	ll n;

	scanf("%lld", &n);

	if (isPrime(n))

		printf("%d\n", count(n));

	else

	{

		for (int i = sqrt(n); i >= 1; i--)

			if (n % i == 0) {

				int a = count(i), b = count(n / i);

				printf("%d\n", a > b ? a : b);

				break;

			}

	}

	return 0;

}

bool isPrime(ll n)

{

	if (n < 5)return n == 2 || n == 3 ? true : false;

	if ((n + 1) % 6 != 0 && (n - 1) % 6 != 0)return false;

	if (n % 2 == 0)return false;

	for (int i = 3; i <= sqrt(n); i += 2)

		if (n % i == 0)

			return false;

	return true;

}

int count(ll n)

{

	int cnt = 0;

	while (n)

		n /= 10, cnt++;

	return cnt;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

#define ll long long 

#define mod 1000000007

#define first f

#define second s

#define N 1000000

vector<ll>v(N);

ll l,m,n,sum,ans,maximum,minimum,mahakal,a,b,c,t,i,j,k;

ll cnt,cnt1,cnt2,cnt3;

string str,str1,str2;

ll arr[N];

int main(){

    cin>>n;

  cin>>str;

  if(n&1){

    cout<<"No"<<endl;

    return 0;

  }

  str1=str.substr(0,n/2);

  str2=str.substr(n/2,n/2);

  //cout<<str1<<" "<<str2<<endl;

  if(str1==str2){

      cout<<"Yes"<<endl;

  }

  else{

      cout<<"No"<<endl;

  }

  

    return 0;

}

// Optimized solution to the same problem (faster):
/*   ꧁༒☬महाकाल☬༒꧂ ꧁༒ঔमहाकालঔ༒꧂

                   

                   ঔৣ۝महाकालᴳᵒᵈ۝ঔৣ            

 

 */ 

#include<bits/stdc++.h>

using namespace std;

//#include <ext/pb_ds/assoc_container.hpp>

//#include <ext/pb_ds/tree_policy.hpp>

//using namespace __gnu_pbds;

//template <typename T, typename cmp=less<T>> using oset =tree<T, null_type, cmp, rb_tree_tag, tree_order_statistics_node_update>;

#define ll long long 

#define mod 1000000007

#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);

#define _it iterator

#define all(_x) _x.begin(),_x.end()

#define f first

#define s second

#define pb push_back

void mahakal(){

	#ifndef ONLINE_JUDGE

	freopen("input.txt","r",stdin);

	freopen("output.txt","w",stdout);

	freopen("error.txt","w",stderr);

	#endif

}

int main(){

	//mahakal(),fast;

	

	ll n ;

	cin>> n ;

	string str ;

	cin>> str ;

	ll l=0 , r= n-1;

	if(n==1 || n%2==1){

		cout<<"No"<<endl;

		return 0;

	}

	for(ll i=0 , j=ceil(n/2.0) ; j<n ; i++ , j++ ){

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

			cout<<"No"<<endl;

			return 0;

		}

	}

	cout<<"Yes"<<endl;



	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

#define ll long long

#define pb push_back

using namespace std;



int main()

{

	ios_base::sync_with_stdio(false);

	cin.tie(NULL);

	int n;

	cin >> n;

	string str;

	cin >> str;

	if(n%2 != 0)

	  cout << "No";

	else

	{

		string str1 = str.substr(0,n/2);

		string str2 = str.substr(n/2,n/2);

		if(str1 == str2)

		   cout << "Yes";

		else

		   cout << "No";

	}

	return 0;

}


// Optimized solution to the same problem (faster):
#include <stdio.h>



int main () {

	int n, ctr = 0, i = 0;

	scanf("%d", &n);

	char str[n];

	scanf("%s", str);

	

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

		if (n % 2 != 0) {

			ctr++;

			break;

		} 

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

			i++;

		} else {

			ctr++;

			break;

		} 

	}

	ctr != 0 ? puts("No") : puts("Yes");

	

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;



int main(){

int n;

cin>>n;

    string s,s2;

    cin>>s;

    int k=s.size();

    if(n%2!=0)cout<<"No\n";

    else

    {

        int t=k/2;

        string m="";

        string w="";

int i,j,k;        for(i=0;i<t;i++)

            m=m+s[i];

        for(i=t;i<s.size();i++)

            w=w+s[i];

            ///cout<<m<<"  "<<w<<endl;

            if(m.compare(w)==0)

                cout<<"Yes\n";

            else cout<<"No\n";



    }



    return 0;

}




// Optimized solution to the same problem (faster):
#include <stdio.h>



int main () {

	int n, ctr = 0, i = 0;

	scanf("%d", &n);

	char str[n];

	scanf("%s", str);

	

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

		if (n % 2 != 0) {

			ctr++;

			break;

		} 

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

			i++;

		} else {

			ctr++;

			break;

		} 

	}

	ctr != 0 ? puts("No") : puts("Yes");

	

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}


// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
/*

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

*   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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#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;

}

// Optimized solution to the same problem (faster):
#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;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;



int main() {

  int N, K;

  cin >> N >> K;



  int cnt = 0, x = 1;

  while (x < K) x *= 2, cnt++;



  long ans = 0;

  for (int i = 1; i <= N; i++) {

    int j = i, tmp = 0;

    while (j < K) j *= 2, tmp++;

    ans += pow(2, cnt - tmp);

  }



  while (cnt--) N *= 2;

  cout << fixed << setprecision(9) << (double) ans / N << "\n";

}

// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

using namespace std;



int main() {

  int N, K;

  cin >> N >> K;

  double ans = 0;

  for (int i = 1; i <= N; i++) {

    double tmp = 1.0 / N;

    int j = i;

    while (j < K) j *= 2, tmp /= 2;

    ans += tmp;

  }

  cout << fixed << setprecision(9) << ans << "\n";

}

// Fastest known solution for this problem: