stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#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; 

}

// Faster C++ solution for the same problem (measured speedup: 3.4286236026967822x):
#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;

}
// Slower C++ solution:
#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;

}


// Faster C++ solution for the same problem (measured speedup: 3.5249014238344953x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 3.2109775329366825x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 3.636627888962989x):
#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;

}
// Slower C++ solution:
#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;

} 

// Faster C++ solution for the same problem (measured speedup: 3.5561786379403024x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 3.210008323474213x):
#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;

}
// Slower C++ solution:
#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;

}


// Faster C++ solution for the same problem (measured speedup: 3.5052236051212544x):
#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;

}//完美结束。
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 3.1930521993775147x):
#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;

}//完美结束。
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 3.6163263554668594x):
#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;

}//完美结束。
// Slower C++ solution:
#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;

} 

// Faster C++ solution for the same problem (measured speedup: 3.536326213677849x):
#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;

}//完美结束。
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 3.1920884005424086x):
#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;

}//完美结束。
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 3.204163519639581x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 3.1929181428537166x):
#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;

}
// Slower C++ solution:
#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;

} 

// Faster C++ solution for the same problem (measured speedup: 3.1901245853522093x):
#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;

}
// Slower C++ solution:
#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;

} 

// Faster C++ solution for the same problem (measured speedup: 3.1901245853522093x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 3.233994868060427x):
#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;

}
// Slower C++ solution:
#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;

}


// Faster C++ solution for the same problem (measured speedup: 1.2378892602936706x):
#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;

}
// Slower C++ solution:
#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;

        }

    }

}

// Faster C++ solution for the same problem (measured speedup: 3.1872585328847265x):
#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;

}//完美结束。
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 3.1869652965764557x):
#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;

}
// Slower C++ solution:
#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;

}


// Faster C++ solution for the same problem (measured speedup: 3.6715126624011702x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 9.399870605549918x):
/*   ꧁༒☬महाकाल☬༒꧂ ꧁༒ঔमहाकालঔ༒꧂

                   

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

 

 */ 

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

}
// Slower C++ solution:
#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;

}


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

 

int main(){

	int input;

	scanf("%d", &input);

	getchar();



    char s[101];

	scanf("%s", s);



	if(input % 2 == 1){

		puts("No");

		return 0;

	}

	input /= 2;

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

		if(s[i] != s [i + input]){

			puts("No");

			return 0;

		}

	}

	puts("Yes");

}
// Slower C++ solution:
#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;

}




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

 

int main(){

	int input;

	scanf("%d", &input);

	getchar();



    char s[101];

	scanf("%s", s);



	if(input % 2 == 1){

		puts("No");

		return 0;

	}

	input /= 2;

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

		if(s[i] != s [i + input]){

			puts("No");

			return 0;

		}

	}

	puts("Yes");

}
// Slower C++ solution:
#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;

}


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





int main () {

    int n;

    scanf("%d", &n);

    char echo[n + 1];

    scanf("%s", echo);

    if (n % 2 == 1) {

        puts("No");

    }

    else {

        int flag = 1;

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

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

                flag = 0;

            }

        }

        if (flag){

            puts("Yes");

        }

        else {

            puts("No");

        }

    }

    return 0;

}