jiahuimbzuai/CoQuIR huggingface dataset:
//  [cpp]
#include <bits/stdc++.h>
using namespace std;

#ifdef LOCAL
#include "dump.hpp"
#else
#define dump(...)
#define dumpv(...)
#endif

#define rep(i, n) for (int i = 0; i < (n); i++)
#define mins(x, y) (x = min(x, y))
#define maxs(x, y) (x = max(x, y))
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
using P = pair<int, int>;
const int MOD = 1e9 + 7;
const int INF = 1001001001;
const ll LINF = 1001002003004005006ll;

map<ll, int> prime_factor(ll n) {
  map<ll, int> ret;
  for (ll i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      ret[i]++;
      n /= i;
    }
  }
  if (n != 1) ret[n] = 1;
  return ret;
}

void solve() {
  int n;
  cin >> n;
  vi a(n);
  rep(i, n) cin >> a[i];
  vector<map<ll, int>> m(n);
  map<ll, int> cnt;
  rep(i, n) {
    auto pm = prime_factor(a[i]);
    for (auto p : pm) cnt[p.first]++;
  }
  int mx = 0;
  for (auto c : cnt) {
    maxs(mx, c.second);
  }
  dump(cnt, mx);
  if (mx <= 1) {
    cout << "pairwise coprime" << endl;
  } else if (mx < n) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  // freopen("temp.1", "r", stdin);
  solve();
  return 0;
}
//  [cpp]
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<string> vs;
// #define INF __INT32_MAX__
#define INF 1e9
#define LINF __LONG_LONG_MAX__

ll gcd(ll a, ll b) {
    if (b == 0) return a;
    else return gcd(b, a % b);
}

int main() {
    int N; cin >> N;
    vi A(N); rep(i, N) cin >> A[i];

    map<int, int> G;

    // 1
    bool ok = true;
    rep(i, N) {
        int x = A[i];
//  cout << "A[i]: " << A[i] << endl;
        for (int j = 2; j <= sqrt(A[i]); j++) {
            if (G[j] != 0 && G[j] != 1) {
                ok = false;
                break;
            }
            if (x == 1) break;
            if (x % j != 0) continue;
            while (x % j == 0) {
                x /= j;
            }
//  cout << "  x:" << x << endl;
            G[j]++;
        }
        if (!ok) break;
        if (x != 1) G[x]++;
    }

    for (auto x : G) {
// cout << x.first << " " << x.second << endl;
        if (x.second != 0 && x.second != 1) {
            ok = false;
            break;
        }

    }
    if (ok) {
        cout << "pairwise coprime" << endl;
        return 0;
    }

    // 2
    ok = true;
    int y = A[0];
    rep(i, N - 1) {
        y = gcd(y, A[i + 1]);
        if (y == 1) break;
    }
    if (y != 1) ok = false;
    if (ok) {
        cout << "setwise coprime" << endl;
        return 0;
    }

    cout << "not coprime" << endl;
}
//  [cpp]
#include <bits/stdc++.h>

using namespace std;
using llong = long long;
using ldbl = long double;
using lpair = pair<llong, llong>;

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

constexpr llong mod = 1e9+7;
constexpr llong inf = mod * mod;

int main() {
  llong N;
  vector<llong> A;
  
  cin >> N;
  A.resize(N);
  for (auto &in: A) {
    cin >> in;
  }
  sort(ALL(A));

  vector<llong> prime;
  for (int i = 2; i <= 1000; i++) {
    bool ok = true;
    for (auto &p: prime) {
      if (i % p == 0) {
        ok = false;
        break;
      }
    }
    if (ok) {
      prime.push_back(i);
    }
  }

  int cnt_one = 0;
  map<llong, llong> m;
  for (auto &a: A) {
    cnt_one += a == 1;
    for (auto &p: prime) {
      if (a % p == 0) {
        m[p]++;
        while (a % p == 0) {
          a /= p;
        }
      }
    }
    if (a != 1) {
      m[a]++;
    }
  }

  bool isN = false;
  bool all_one = true;
  for (auto it: m) {
    isN |= it.second == N;
    all_one &= it.second == 1;
  }

  if (all_one) {
    cout << "pairwise coprime" << endl;
  }
  else if (isN) {
    cout << "not coprime" << endl;
  }
  else {
    cout << "setwise coprime" << endl;
  }

  return 0;
}
//  [c]
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <stdbool.h>
typedef long long LL;
typedef long double Lf;
#define in (void)scanf
#define Rep(i,a,n)for(int i=(int)(a);i<(int)(n);i++)
//#define Rep(i,a,n)for(LL i=(LL)(a);i<(LL)(n);i++)
#define rep(i,n)Rep(i,0,n)
#define Repp(i,l,r,k)for(int i=(int)(l);i<(int)(r);i+=(int)(k))
//#define Repp(i,l,r,k)for(LL i=(LL)(l);i<(LL)(r);i+=(LL)(k))
#define Ma(x,y) ((x)>(y)?(x):(y))
#define mi(x,y) ((x)<(y)?(x):(y))
#define MOD 1000000007//998244353,1000000007,1000000009,4999999999999997
int upi(const void* a, const void* b) { return*(int*)a<*(int*)b ? -1 : *(int*)a> * (int*)b ? 1 : 0; }
int downi(const void* a, const void* b) { return*(int*)a<*(int*)b ? 1 : *(int*)a> * (int*)b ? -1 : 0; }
void sortupi(int* a, int n) { qsort(a, n, sizeof(int), upi); } //1,2,3,4,...
void sortdowni(int* a, int n) { qsort(a, n, sizeof(int), downi); }
int upLL(const void* a, const void* b) { return*(LL*)a<*(LL*)b ? -1 : *(LL*)a> * (LL*)b ? 1 : 0; }
int downLL(const void* a, const void* b) { return*(LL*)a<*(LL*)b ? 1 : *(LL*)a> * (LL*)b ? -1 : 0; }
void sortupLL(LL* a, int n) { qsort(a, n, sizeof(LL), upLL); }
void sortdownLL(LL* a, int n) { qsort(a, n, sizeof(LL), downLL); }
int cmp_char(const void* a, const void* b) { return *(char*)a - *(char*)b; } // a,b,c,d
int cmp_str(const void* a, const void* b) { return strcmp(*(const char**)a, *(const char**)b); } // aaa,aab
LL gcd(LL p, LL q) { while (q) { LL t = p % q; p = q; q = t; }return p; }
LL modpow(LL a,LL n,int m){LL x=1;for(a%=m;n;n/=2)n&1?x=x*a%m:0,a=a*a%m;return x;}
#define invmodpow(b,p)modpow(b,p-2,p)// a/b≡a*b^{-1}(mod p)...return b^{-1}(mod p)
typedef struct fac { LL n, exp; }F;
LL fact(LL n,F*a){LL x,i,j,c=0;x=n;for(i=2;i*i<=x;i++){for(j=1;x%i==0;j++)x/=i;if(j>1){a[c].n=i;a[c++].exp=j-1;}}if(x-1){a[c].n=x;a[c++].exp=1;}return c;}
//snippet



#define N 1000009

void run() {
	int n, a[N], g;
	in("%d", &n);
	rep(i, n) {
		in("%d", &a[i]);
		if (!i)g = a[i];
		else g = gcd(a[i], g);
	}
	if (g - 1) {
		printf("not coprime\n");
		return;
	}

	int d[N] = { 0 };
	rep(i, n) {
		F f[20];
		int c = fact(a[i], f);
		rep(j, c)d[f[j].n]++;
	}
	rep(i, N)if (d[i] > 1) {
		printf("setwise coprime\n");
		return;
	}
	printf("pairwise coprime\n");
}

int main() {
	int test = 1;
//	in("%d", &test);
	while (test--) {
		run();
	}
}
//  [c]
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <stdbool.h>
typedef long long LL;
typedef long double Lf;
#define in (void)scanf
#define Rep(i,a,n)for(int i=(int)(a);i<(int)(n);i++)
//#define Rep(i,a,n)for(LL i=(LL)(a);i<(LL)(n);i++)
#define rep(i,n)Rep(i,0,n)
#define Repp(i,l,r,k)for(int i=(int)(l);i<(int)(r);i+=(int)(k))
//#define Repp(i,l,r,k)for(LL i=(LL)(l);i<(LL)(r);i+=(LL)(k))
#define Ma(x,y) ((x)>(y)?(x):(y))
#define mi(x,y) ((x)<(y)?(x):(y))
#define MOD 1000000007//998244353,1000000007,1000000009,4999999999999997
int upi(const void* a, const void* b) { return*(int*)a<*(int*)b ? -1 : *(int*)a> * (int*)b ? 1 : 0; }
int downi(const void* a, const void* b) { return*(int*)a<*(int*)b ? 1 : *(int*)a> * (int*)b ? -1 : 0; }
void sortupi(int* a, int n) { qsort(a, n, sizeof(int), upi); } //1,2,3,4,...
void sortdowni(int* a, int n) { qsort(a, n, sizeof(int), downi); }
int upLL(const void* a, const void* b) { return*(LL*)a<*(LL*)b ? -1 : *(LL*)a> * (LL*)b ? 1 : 0; }
int downLL(const void* a, const void* b) { return*(LL*)a<*(LL*)b ? 1 : *(LL*)a> * (LL*)b ? -1 : 0; }
void sortupLL(LL* a, int n) { qsort(a, n, sizeof(LL), upLL); }
void sortdownLL(LL* a, int n) { qsort(a, n, sizeof(LL), downLL); }
int cmp_char(const void* a, const void* b) { return *(char*)a - *(char*)b; } // a,b,c,d
int cmp_str(const void* a, const void* b) { return strcmp(*(const char**)a, *(const char**)b); } // aaa,aab
LL gcd(LL p, LL q) { while (q) { LL t = p % q; p = q; q = t; }return p; }
LL modpow(LL a,LL n,int m){LL x=1;for(a%=m;n;n/=2)n&1?x=x*a%m:0,a=a*a%m;return x;}
#define invmodpow(b,p)modpow(b,p-2,p)// a/b≡a*b^{-1}(mod p)...return b^{-1}(mod p)
typedef struct fac { LL n, exp; }F;
LL fact(LL n,F*a){LL x,i,j,c=0;x=n;for(i=2;i*i<=x;i++){for(j=1;x%i==0;j++)x/=i;if(j>1){a[c].n=i;a[c++].exp=j-1;}}if(x-1){a[c].n=x;a[c++].exp=1;}return c;}
//snippet



#define N 1111111

void run() {
	int n, a[N], g;
	in("%d", &n);
	rep(i, n) {
		in("%d", &a[i]);
		if (!i)g = a[i];
		else g = gcd(a[i], g);
	}
	if (g - 1) {
		printf("not coprime\n");
		return;
	}

	int d[N] = { 0 };
	rep(i, n) {
		F f[N];
		int c = fact(a[i], f);
		rep(j, c)d[f[j].n]++;
	}
	rep(i, N)if (d[i] > 1) {
		printf("setwise coprime\n");
		return;
	}
	printf("pairwise coprime\n");
}

int main() {
	int test = 1;
//	in("%d", &test);
	while (test--) {
		run();
	}
}
//  [javascript]
const factorization = (n) => {
    let primes = []
    for(let i=2; i*i<=n; i++) {
        let e=0
        while(n%i===0) {
            e++
            n/=i
        }
        if(e) {
            primes.push(i)
        }
    }
    if(n>1) {
        primes.push(n)
    }
    return primes
}

const getGCD = (a,b) => {
    if(b===0)return a
    else if(a===0)return b
    return getGCD(b, a%b)
}

const main = (arg) => {
    const N = Number(arg.split("\n")[0])
    const a = arg.split("\n")[1].split(" ").map(Number)
    
    const MAX_A = 10**6+1
    
    //  check if p is in {a} (paircoprime)
    let set = [...new Array(MAX_A)].fill(0)
    isPairCoprime = true
    for(let i=0; i<N; i++) {
        //const factors = Object.keys(factorizationBySoE(a[i], primes))
  	    const factors = factorization(a[i])
        for(let j=0; j<factors.length; j++ ) {
            if(set[factors[j]] === 1) {
                isPairCoprime = false
            }
            set[factors[j]] = 1
        }
    }

  	if(isPairCoprime) {
        console.log("pairwise coprime")
        return
    }

  // setcoprime
    let gcd = 0
    for(let i=0; i<a.length; i++) {
        gcd = getGCD(gcd, a[i])
    }
    
    if(gcd===1) {
        console.log("setwise coprime")
        return
    }
    
    console.log("not coprime")
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input) {
	input = input.trim().split("\n").map(function(x) { return x.split(" ")});
	let N = parseInt(input[0][0], 10);
	let A = input[1].map(e => parseInt(e, 10));
	let Amap = Array.from({length: 1e6 + 1}, () => false);
	let ansFlag0 = false;
	let N2 = N;
	let variation = 0;
	for (let i = 0; i < N; i++){
		if (Amap[A[i]]){
			if (A[i] !==1) ansFlag0 = true;
			N2 --;
			continue;
		}
		Amap[A[i]] = true;
		variation ++;
	}

	let bitmap = Array.from({length: 1e6 + 1}, () => false);
	bitmap[0] = true;
	bitmap[1] = true;

	
	// let ansFlag1 = false;
	let countList = [];
	for (let i = 2; i < bitmap.length; i++){
		if (bitmap[i]) continue;
		let count = 0;
		let j = 1;
		if (Amap[i * j]){
			count ++;
		}
		for (j = 2; j <= (1e6 / i); j++){
			bitmap[i * j] = true;
			if (Amap[i * j]){
				count ++;
			}

		}
		countList.push(count);
	}
	countList.sort((a,b) => a - b);
	let ans = "pairwise coprime";
	if (ansFlag0) ans = "setwise coprime";
	for (let i = 0; i < countList.length; i++){
		if (countList[i] <= 1) continue;
		if(countList[countList.length - 1] < N2){
			ans = "setwise coprime";
		} else {
			ans = "not coprime";
		}
	}
	if (variation === 1){
		if (A[0] === 1) ans = "pairwise coprime";
		else ans = "not coprime";
	}
	console.log(ans);
	
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
"use strict";
var input=require("fs").readFileSync("/dev/stdin","utf8");
var cin=input.split(/ |\n/),cid=0;
function next(){return +cin[cid++];}
function nextstr(){return cin[cid++];}
function nextbig(){return BigInt(cin[cid++]);}
function nexts(n,a){return a?cin.slice(cid,cid+=n):cin.slice(cid,cid+=n).map(a=>+a);}
function nextssort(n,a){return a?cin.slice(cid,cid+=n).map(a=>+a).sort((a,b)=>b-a):cin.slice(cid,cid+=n).map(a=>+a).sort((a,b)=>a-b);}
function nextm(h,w,a){var r=[],i=0;if(a)for(;i<h;i++)r.push(cin.slice(cid,cid+=w));else for(;i<h;i++)r.push(cin.slice(cid,cid+=w).map(a=>+a));return r;}
function xArray(v){var a=arguments,l=a.length,r="Array(a["+--l+"]).fill().map(x=>{return "+v+";})";while(--l)r="Array(a["+l+"]).fill().map(x=>"+r+")";return eval(r);}

function gcd(a,b){return b?gcd(b,a%b):a;}

var myOut = main();
if(myOut !== undefined)console.log(String(myOut));

function main(){
  var n = next();
  var a = nexts(n);
  var b = xArray(0,1e6+1);
  var f = 1;
  for(var i = 0; i < n && f; i++){
    var t = a[i];
    for(var j = 2; j*j <= t; j++){
      if(t%j === 0){
        if(b[j]){
          f = 0;
          break;
        }
        b[j] = 1;
        while(t%j === 0)t /= j;
      }
    }
    if(t > 1){
      if(b[t]){
        f = 0;
      }else{
        b[t] = 1;
      }
    }
  }
  if(f)return "pairwise coprime";
  t = a[0];
  for(var i = 1; i < n; i++){
    t = gcd(t,a[i]);
    if(t === 1)return "setwise coprime";
  }
  return "not coprime";
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

func main() {
	var n int
	fmt.Scan(&n)
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	as := make([]int, n)
	for i := range as {
		sc.Scan()
		as[i], _ = strconv.Atoi(sc.Text())
	}

	pw := true
	pm := make(map[int]bool)
	for i := range as {
		m := prime(as[i])
		for k, _ := range m {
			if _, ok := pm[k]; ok {
				pw = false
				break
			}
			pm[k] = true
		}
	}

	if pw {
		fmt.Println("pairwise coprime")
		return
	}

	sg := gcd(as[0], as[1])
	for i := 2; i < n; i++ {
		sg = gcd(sg, as[i])
		if sg == 1 {
			break
		}
	}

	if sg == 1 {
		fmt.Println("setwise coprime")
	} else {
		fmt.Println("not coprime")
	}
}

func gcd(a, b int) int {
	if a < b {
		a, b = b, a
	}
	r := a % b
	for r != 0 {
		a = b
		b = r
		r = a % b
	}
	return b
}

func prime(a int) map[int]bool {
	m := make(map[int]bool)
	for i := 2; i <= sqrt(a); i++ {
		for a%i == 0 {
			a /= i
			m[i] = true
		}
	}
	if a > 1 {
		m[a] = true
	}
	return m
}

func sqrt(a int) int {
	return int(math.Sqrt(float64(a)))
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}
//  [go]
package main

import (
  "bufio"
  "os"
  "strconv"
  "strings"
  "fmt"
)

func Solve() {
  var N int
  NextInt(&N)
  var A []int
  NextIntSlice(&A)
  C := make([]int, MaxInt(A...) + 1)
  for _, a := range A {
    for d := 2; d * d <= a; d++ {
      if a % d > 0 { continue }
      C[d]++
      for a % d == 0 { a /= d }
    }
    if a > 1 { C[a]++ }
  }
  M := MaxInt(C...)
  if M <= 1 {
    Write("pairwise coprime")
  } else if M < N {
    Write("setwise coprime")
  } else {
    Write("not coprime")
  }
}

func main() {
  Solve()
  Output()
}

var reader = bufio.NewReaderSize(os.Stdin, 1000000)
var writer = bufio.NewWriter(os.Stdout)
func NextLine() string {
  buffer := make([]byte, 0)
  for true {
    line, isPrefix, err := reader.ReadLine()
    if err != nil { panic(err) }
    buffer = append(buffer, line...)
    if !isPrefix { break }
  }
  return string(buffer)
}
func NextInt(A ...*int) {
  L := strings.Split(NextLine(), " ")
  for i, a := range A {
    *a, _ = strconv.Atoi(L[i])
  }
}
func NextIntSlice(A *[]int) {
  L := strings.Split(NextLine(), " ")
  if len(L) == 1 && L[0] == "" {
    (*A) = make([]int, 0)
    return
  }
  (*A) = make([]int, len(L))
  for i, l := range L {
    (*A)[i], _ = strconv.Atoi(l)
  }
}
func NextFloat(A ...*float64) {
  L := strings.Split(NextLine(), " ")
  for i, a := range A {
    *a, _ = strconv.ParseFloat(L[i], 64)
  }
}
func NextFloatSlice(A *[]float64) {
  L := strings.Split(NextLine(), " ")
  if len(L) == 1 && L[0] == "" {
    (*A) = make([]float64, 0)
    return
  }
  (*A) = make([]float64, len(L))
  for i, l := range L {
    (*A)[i], _ = strconv.ParseFloat(l, 64)
  }
}
func Write(S ...interface{}) {
  fmt.Fprintln(writer, S...)
}
func WriteIntSlice(A []int) {
  B := make([]interface{}, len(A))
  for i, a := range A { B[i] = a }
  fmt.Fprintln(writer, B...)
}
func Output() {
  _ = writer.Flush()
}
func MaxInt(A ...int) int {
  max := A[0]
  for _, a := range A {
    if max < a { max = a }
  }
  return max
}
func MinInt(A ...int) int {
  min := A[0]
  for _, a := range A {
    if a < min { min = a }
  }
  return min
}
func SumInt(A ...int) int {
  sum := 0
  for _, a := range A {
    sum += a
  }
  return sum
}
func AbsInt(x int) int {
  if x < 0 { x = -x }
  return x
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	a, _ := strconv.Atoi(next())
	return a
}

type result int

const (
	PairwiseCoprime result = iota
	SetwiseCoprime
	NotCoprime
)

func main() {
	buf := make([]byte, 1024*1024)
	sc.Buffer(buf, bufio.MaxScanTokenSize)
	sc.Split(bufio.ScanWords)

	n := nextInt()
	a := make([]int, n)

	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}

	r := solve(a)
	switch r {
	case PairwiseCoprime:
		fmt.Println("pairwise coprime")
	case SetwiseCoprime:
		fmt.Println("setwise coprime")
	case NotCoprime:
		fmt.Println("not coprime")
	}
}

func gcd(a int, b int) int {
	for {
		r := a % b
		if r == 0 {
			return b
		}
		a, b = b, r
	}
}

func solve(a []int) result {
	table := make([]map[int]struct{}, 1000000+1)

	table[1] = make(map[int]struct{})

	for i := 2; i < len(table); i++ {
		if len(table[i]) > 0 {
			continue
		}

		table[i] = make(map[int]struct{})
		table[i][i] = struct{}{}

		for j := 2; i*j < len(table); j++ {
			if len(table[i*j]) == 0 {
				table[i*j] = make(map[int]struct{})
			}
			table[i*j][i] = struct{}{}
		}
	}

	g := a[0]
	k := true
	cnt := make(map[int]int)
	for i := 0; i < len(a); i++ {
		if a[i] == 1 {
			continue
		}

		for v, _ := range table[a[i]] {
			cnt[v]++
			if cnt[v] > 1 {
				k = false
			}
		}

		g = gcd(g, a[i])
	}

	if k {
		return PairwiseCoprime
	} else if g == 1 {
		return SetwiseCoprime
	} else {
		return NotCoprime
	}
}
//  [ruby]
eval'A=#'+`tr ' ' ,`
c=A.tally
print A.reduce(:gcd)>1?:not:(2..t=10**6).any?{|i|(1..t/i).sum{c[_1*i]||0}>1}?:setwise: :pairwise," coprime"
//  [ruby]
N = gets.strip.to_i
A = Array.new(N)
data = gets.split

i = 0
ma = 0
while i < N
  a = data[i].to_i
  if a > ma
    ma = a
  end
  A[i] = a
  i += 1
end

d = Array.new(ma+1)
e = Array.new(ma/2)
i = 0
while i < ma/2
  d[(i+1)*2] = 2
  e[i] = i * 2 + 3
  i += 1
end

mp = ma ** 0.5 + 1
p = 3

ii = 0
l = e.size
while p <= mp
  d[p] = p
  i = ii+1
  j = i
  while i < l
    x = e[i]
    if x % p == 0
      d[x] = p
    else
      e[j] = x
      j += 1
    end
    i += 1
  end
  l = j
  ii += 1
  p = e[ii]
end

i = ii
while i < l
  d[e[i]] = e[i]
  i += 1
end

pc = true
ip = Array.new(ma+1,-1)
c = Array.new(ma+1,0)
i = 0
mc = 0
sc = false
while (pc || mc == i) && i < N
  aa = A[i]
  while p = d[aa]
    if pc
      if ip[p] >= 0
        if ip[p] != i
          pc = false
        end
      end
      ip[p] = i
    end
    aa /= p while d[aa] == p
    if c[p] == i
      mc = c[p] = i+1
    end
  end
  i += 1
end

sc = mc != N


if pc
  puts "pairwise coprime"
elsif sc
  puts "setwise coprime"
else
  puts "not coprime"
end
//  [ruby]
# エラトステネスの篩で素数列挙して高速に素因数分解したい！
# ref: https://atcoder.jp/contests/abc177/editorial/82
class PrimeDivWithSieve
  def initialize(n)
    @sieve = []
    @elements = {}
    (2..n).each do |i|
      next if @elements[i]
      @sieve << i
      @elements[i] = [i]

      sieve_target = i * 2
      while sieve_target <= n do
        if @elements[sieve_target]
          @elements[sieve_target].push(i)
        else
          @elements[sieve_target] = [i]
        end
        sieve_target += i
      end
    end
  end

  def element(num)
    @elements[num] || []
  end
end


_n = gets.chomp.split.map(&:to_i)
arr = gets.chomp.split.map(&:to_i)

divisor = PrimeDivWithSieve.new(1_000_000)
common_elms = divisor.element(arr[0])
all_elms = {}
common_elms.each do |i|
  all_elms[i] = true
end

pair = true
set = false
arr[1..-1].each do |i|
  crr_elms = divisor.element(i)
  if pair
    crr_elms.each do |i|
      break pair = false if all_elms[i]
      all_elms[i] = true
    end
  end
  if !set
    common_elms = (common_elms & crr_elms)
    set = common_elms.empty?
  end

  break if set && !pair
end

if pair
  puts "pairwise coprime"
elsif set
  puts "setwise coprime"
else
  puts "not coprime"
end
//  [rust]
use proconio::{input, fastout};
use std::collections::HashMap;

#[fastout]
fn main() {
    input! {
        n: usize,
        aa: [usize; n],
    }

    let mut ff = vec![];
    let mut is_pairwise = true;
    let mut g = aa[0];

    let max = aa.iter().copied().max().unwrap();
    let primes = sieve((max as f64).sqrt().ceil() as usize);

    for &a in aa.iter() {
        g = gcd(g, a);
        ff.push(factors(a, &primes));
    }

    let mut used = vec![false; 1_000_001];
    for f in ff.iter() {
        for (&k, _) in f.iter() {
            if used[k] {
                is_pairwise = false;
            }
            used[k] = true;
        }
    }


    if g != 1 {
        println!("not coprime");
    } else if is_pairwise {
        println!("pairwise coprime");
    } else {
        println!("setwise coprime");
    }
}

fn factors(n: usize, primes: &[usize]) -> HashMap<usize, usize> {
    let mut factors = HashMap::new();
    let mut r = n;
    for &i in primes.iter() {
        while r % i == 0 {
            *factors.entry(i).or_insert(0) += 1;
            r /= i;
        }
    }
    if r > 1 {
        *factors.entry(r).or_insert(0) += 1;
    }

    factors
}

fn sieve(n: usize) -> Vec<usize> {
    let mut primes = vec![];
    let mut is_prime = vec![true; n + 1];
    for i in 2..n+1 {
        if !is_prime[i] {
            continue;
        }
        primes.push(i);
        for j in i..n/i+1 {
            is_prime[i * j] = false;
        }
    }
    primes
}

fn gcd(a: usize, b: usize) -> usize {
    if a % b == 0 {
        b
    } else {
        gcd(b, a % b)
    }
}
//  [python]
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import itertools
from decimal import *

input = sys.stdin.readline

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

inf = float('inf')
mod = 1000000007

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

def main():
	A = inputStr()

	if A.isupper():
		print("A")
	else:
		print("a")



#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
if __name__ == "__main__":
	main()
//  [python]
import sys

if sys.subversion[0] == "PyPy":
    import io, atexit

    sys.stdout = io.BytesIO()
    atexit.register(lambda: sys.__stdout__.write(sys.stdout.getvalue()))

    sys.stdin = io.BytesIO(sys.stdin.read())
    input = lambda: sys.stdin.readline().rstrip()
RS = raw_input
RA = lambda x=int: map(x, RS().split())
RN = lambda x=int: x(RS())


def solve():
    if ord(a) > ord("Z"):
        print "a"
    else:
        print "A"
    return




a = RS()
solve()
//  [python]
import sys

sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
from math import floor, sqrt, factorial, hypot, log  # log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter, defaultdict, deque
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement
from bisect import bisect_left, bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint


def ceil(a, b): return (a + b - 1) // b


inf = float('inf')
mod = 10 ** 9 + 7


def pprint(*A):
    for a in A:     print(*a, sep='\n')


def INT_(n): return int(n) - 1


def MI(): return map(int, input().split())


def MF(): return map(float, input().split())


def MI_(): return map(INT_, input().split())


def LI(): return list(MI())


def LI_(): return [int(x) - 1 for x in input().split()]


def LF(): return list(MF())


def LIN(n: int): return [I() for _ in range(n)]


def LLIN(n: int): return [LI() for _ in range(n)]


def LLIN_(n: int): return [LI_() for _ in range(n)]


def LLI(): return [list(map(int, l.split())) for l in input()]


def I(): return int(input())


def F(): return float(input())


def ST(): return input().replace('\n', '')


def main():
    if input().isupper() :
        print("A")
    else:
        print("a")


if __name__ == '__main__':
    main()
//  [java]

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String  N = scanner.nextLine();
        char alpha = N.charAt(0);
        if (Character.isUpperCase(alpha)) {
            System.out.println("A");

        } else {

            System.out.println("a");
        }

    }
}
//  [java]


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		String x=scan.next();
		char[] y=x.toCharArray();
		if(y[0]>='A' && y[0]<='Z') {
			System.out.println("A");
		}
		else {
			System.out.println("a");
		}
	}

}
//  [java]
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn=new Scanner(System.in);
		char ch = scn.next().charAt(0);
		if(ch>=65 && ch<=91){
			System.out.println("A");
		}else{
			System.out.println('a');
		}
				

	}

}
//  [cpp]
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
#define mp make_pair
#define v vector
#define inp_push(no, v) \
    ll no;              \
    cin >> no;          \
    v.push_back(no);
#define pb push_back
#define fi first
#define se second
#define ALL(v) v.begin(), v.end()
#define UN(v) sort((v).begin(), (v).end()), v.erase(unique(v.begin(), v.end()), v.end())
#define N 200005
#define mod 1000000009
#define INF INT64_MAX

//////////////////////////IMPORTANT FUNCTIONS/////////////////////////////////////////////

/* Guidlines berfore submitting solution
1. Check N value before submitting
2. Check all constant kind of values you are using. Might give WA. Think
3. Check mod value
*/

v<ll> fact(N);
v<ll> prime_check(1e7 + 2);
v<ll> primes;

long long powmod(long long x, long long y, long long m)
{
    long long res = 1LL;
    while (y)
    {
        if (y & 1)
            res = (res * x) % m;
        x = (x * x) % m;
        y /= 2;
    }
    return res;
}

void init_fact()
{
    fact[0] = 1;
    for (ll i = 1; i < N; i++)
    {
        fact[i] = (fact[i - 1] * i) % mod;
    }
}

ll C(ll n, ll r)
{
    if (n < r)
        return 0;
    ll temp = fact[n] * powmod(fact[r], mod - 2, mod) % mod;
    temp *= powmod(fact[n - r], mod - 2, mod);
    temp %= mod;
    return temp;
}

void Sieve()
{
    for (ll i = 2; i <= 1e7 + 1; i++)
    {
        if (prime_check[i])
            continue;
        primes.pb(i);
        for (ll j = 2 * i; j <= 1e7 + 1; j += i)
            prime_check[j] = i;
    }
}
ll phi(ll n)
{
    ll i, res = n;
    for (i = 2; i * i <= n; i++)
        if (n % i == 0)
        {
            while (n % i == 0)
                n /= i;
            res -= res / i;
        }
    if (n > 1)
        res -= res / n;
    return res;
}

/////////////////////////////////////START CODE HERE/////////////////////////////////////////////

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    // init_fact();
    // Sieve();
    char a;
    cin >> a;
    if (a >= 'A' && a <= 'Z')
        cout << "A\n";
    else
        cout << "a\n";
}
//  [c]
#include<stdio.h>

int main(void)
{
	char a[1] = {0};

	scanf("%c", &a[0]);

	if(a[0]>=65&&a[0]<=90)
	{
		printf("A");
	}

	if (a[0] >= 97 && a[0] <= 122)
	{
		printf("a");
	}
	return 0;
}
//  [c]
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

typedef long long ll;

int max(int a, int b){
  if(a > b) return a;
  else return b;
}
int min(int a, int b){
  if(a < b) return a;
  else return b;
}

int sort(const void *a ,const void *b){
  return *(int*)a - *(int*)b;
}

int main(){

  char a;
  scanf("%c",&a);

  if(a - 'Z' <= 0){
    printf("A");
  }else{
    printf("a");
  }

  return 0;
}
//  [c]
#include<stdio.h>

int main(void){
  char s[1];
  scanf("%s",s);

  if(s[0]>='a' && s[0]<='z')
    printf("a\n");
  else if(s[0]>='A' && s[0]<='Z')
    printf("A\n");

  return 0;
}
//  [javascript]
const a = require('fs').readFileSync('/dev/stdin', 'utf8')

console.log(/[A-Z]/.test(a) ? 'A' : 'a')
//  [javascript]
console.log(/[A-Z]/.test(require("fs").readFileSync("/dev/stdin", "utf8")) ? "A" : "a");
//  [javascript]
function main(input) {
  const isUpperCase = (str) => {
    let arr = str.match(/^[A-Z]/);
    return arr ? true : false;
  };
  if (isUpperCase(input)) {
    console.log("A");
    return;
  } else {
    console.log("a");
    return;
  }
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
// main("A");
//  [go]
package main

import (
	"fmt"
	"strings"
)

func main() {
	var a string
	fmt.Scan(&a)
	l := strings.ToLower(a)
	if a != l {
		fmt.Print("A")
	} else {
		fmt.Print("a")
	}
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
	"strings"

)


func main() {
	solve(os.Stdin, os.Stdout)
}

type ReaderEx struct {
	baseScanner *bufio.Scanner
	words       []string
	nextWordIdx func() int
	initWordIdx func(int)
}

func NewScannerEx(stdin io.Reader) *ReaderEx {
	var this ReaderEx
	var idx int
	var wordsCnt int
	this.baseScanner = bufio.NewScanner(stdin)
	this.baseScanner.Buffer(make([]byte, 0), 1E+11)
	this.nextWordIdx = func() int {
		cur := idx
		idx = (idx + 1) % wordsCnt
		return cur
	}
	this.initWordIdx = func(wc int) {
		idx = 0
		wordsCnt = wc
	}
	return &this
}

func (me *ReaderEx) Scan(doSplit bool) (isScanned bool) {
	isScanned = me.baseScanner.Scan()
	if doSplit {
		me.words = strings.Fields(me.baseScanner.Text())
	} else {
		me.words = []string{me.baseScanner.Text()}
	}
	me.initWordIdx(len(me.words))
	return
}

func (me *ReaderEx) nextBytes() []byte {
	return []byte(me.words[me.nextWordIdx()])
}
func (me *ReaderEx) nextString() string {
	return me.words[me.nextWordIdx()]
}

type StringArray []string

func (me *ReaderEx) nextStringArray() StringArray {
	return me.words[me.nextWordIdx():]
}

func (me StringArray) toStrings() []string {
	return me
}

func (me StringArray) toInts() []int {
	strValues := me.toStrings()
	values := make([]int, len(strValues))
	for i, v := range strValues {
		n, err := strconv.Atoi(v)
		if err != nil {
			panic(err)
		}
		values[i] = n
	}
	return values
}
func (me *ReaderEx) nextInt() int {
	n, err := strconv.Atoi(me.words[me.nextWordIdx()])

	defer func() {
		if err != nil {
			panic(fmt.Sprintf("getInt(%d)", n))
		}
	}()
	return n
}

func pow(x, y, mod int) (ans int) {

	ans = 1
	for bit := 1 << uint(math.Floor(math.Log2(float64(y)))); ; bit >>= 1 {
		if y&bit != 0 {
			ans *= x
			if mod > 0 {
				ans %= mod
			}
		}
		if bit <= 1 {
			return
		}
		ans *= ans
		if mod > 0 {
			ans %= mod
		}
	}
}

type factType struct {
	prime int
	count int
}

func fact(n int) (facts []*factType) {

	for i := 2; i*i <= n; i++ {
		if n%i == 0 {
			fa := factType{prime: i}
			for n%fa.prime == 0 {
				n /= fa.prime
				fa.count++
			}
			facts = append(facts, &fa)
		}
	}
	if n > 1 {
		facts = append(facts, &factType{prime: n, count: 1})
	}
	return facts
}
func dec2bin(n int) (ret []bool) {
	for bit := 1 << uint(math.Floor(math.Log2(float64(n)))); ; bit >>= 1 {
		ret = append(ret, n&bit != 0)

		if bit <= 1 {
			return
		}
	}

}

func abs(v int) int {
	if v < 0 {
		v = -v
	}
	return v
}

func b2i(b bool) (i int) {
	if b {
		i = 1
	} else {
		i = 0
	}
	return
}

func solve(stdin io.Reader, stdout io.Writer) {

	r := NewScannerEx(stdin)
	r.Scan(true)
	al := r.nextString()

	ans := "a"
	if al[0] >= 'A' && al[0] <= 'Z' {
		ans = "A"
	}
	fmt.Fprintln(stdout, ans)
}
//  [ruby]
require 'pp'
$DEBUG ? define_method(:dpp){|e|pp e} : define_method(:dpp){|e|}

# 入力値を文字列で返却する
def gets_s()
  gets.chomp
end
s = gets_s

upcase = ("A".."Z").to_a
downcase = ("a".."z").to_a

if upcase.include?(s)
  puts("A")
else
  puts("a")
end
//  [ruby]
alpha = gets.to_s
if /[A-Z]/ =~ alpha
  print "A"
else
  print "a"
end
//  [ruby]
a = gets.chomp

if a =~ /[a-z]/
  puts "a"
else
  puts "A"
end
//  [swift]
import Foundation
let arr=readLine()!
if arr.range(of: "[A-Z]", options: .regularExpression) != nil{
    print("A")
}else if arr.range(of: "[a-z]", options: .regularExpression) != nil{
    print("a")
}
//  [swift]
import Foundation

func readInt() -> Int {
    return Int(readLine()!)!
}

func readString() -> String {
    return readLine()!
}

func readLines(times: Int) -> [String] {
    var array: [String] = []
    for _ in 0..<times {
        array.append(readLine()!)
    }
    return array
}

func readSeparatedStrings() -> [String] {
    return readLine()!.split(separator: " ").map({String($0)})
}

func readSeparatedInts() -> [Int] {
    return readLine()!.split(separator: " ").map({Int($0)!})
}

let x = readString()
let pattern = "[A-Z]"
let regex = try! NSRegularExpression(pattern: pattern, options: [])

if regex.firstMatch(in: x, options: [], range: NSRange(location: 0, length: x.count)) != nil {
    print("A")
} else {
    print("a")
}
//  [swift]
import Foundation
let a = readLine()!
print(a.range(of: "[A-Z]", options: .regularExpression) == nil ? "a" : "A")
//  [typescript]
import { readFileSync } from 'fs'
import { reverse } from 'dns'
import { start } from 'repl'
 
let lines: string[] = [];
const reader = require('readline').createInterface({
    input: process.stdin,
    output: process.stdout
});
 
reader.on('line', function (line: string) {
    lines.push(line);
});
reader.on('close', function () {
    /* let [n, d] = lines[0].split(' ').map( _ => parseInt(_)) */
    let a = lines[0]

    if('a' <= a && a <= 'z') {
        console.log('a')
    } else {
        console.log('A')
    }


});
//  [typescript]
import { readFileSync } from "fs";

const read = () =>
  readFileSync(0, "utf8")
    .split("\n")
    .map((line) => line.split(" "));

const main = (input: string[][]) => {
  const alpha = input[0][0];

  return alpha === alpha.toUpperCase() ? "A" : "a";
};

console.log(main(read()));
//  [typescript]
// A - αlphabet
import { readFileSync } from 'fs';
const input = readFileSync('/dev/stdin', 'utf8');

const result = input === input.toUpperCase() ? 'A' : 'a';

console.log(result);
//  [python]
import sys
input = sys.stdin.readline

import numpy as np

def main():
    n = int(input())
    s = input().rstrip()

    x = n//2



    if s[:x] == s[x:]:
        print("Yes")
    else:
        print("No")



if __name__ == '__main__':
    main()
//  [python]
#gcdは3.4.3だとfractionsにある
from fractions import gcd
import math

from math import factorial as f

from math import ceil,floor,sqrt

from sys import exit

from copy import deepcopy
import numpy as np

import bisect
import re
import heapq


from copy import deepcopy
import itertools

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))






def main():
    n = ii()
    s = input()
    n2 = n//2

    if n%2:
        print('No')
    else:
        for i in range(n2):
            if not s[i] == s[i+n2]:
                print('No')
                exit()
        print('Yes')




main()
//  [python]
import numpy as np

n = int(input())
s = input()
if n % 2 != 0:
    print("No")
    exit()
for i in range(n // 2):
    if s[i] != s[i + n // 2]:
        print("No")
        exit()

print("Yes")
//  [java]
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		String s = sc.next();

		String t = s.substring(0, n / 2);

		if ((t + t).equals(s)) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}

		sc.close();
	}
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;

typedef long long ll; 
#define inf 1000*1000*1000+9
#define infl (ll)inf*inf
#define sz(x) ((int) x.size())
#define all(a) a.begin(),a.end()
const int mod=1e9+7; 

const int nax=1e6+6; 
vector<ll> tr[nax<<2]; 
ll sum[nax<<2]; 
vector<ll> ss[nax<<2]; 
ll a[nax]; 

void build(int p, int l, int r){
	if(l==r){
		tr[p].push_back(a[l]); 
		sum[p]=a[l]; 
		ss[p].push_back(a[l]); 
	}	
	else {
		int m=(l+r)>>1, c1=p<<1, c2=p<<1|1 ; 	
		build(c1,l,m); 
		build(c2,m+1,r); 
		int i=0, j=0; 
		ll cur=0; 
		while(i< sz(tr[c1]) && j<sz(tr[c2])){
			if(tr[c1][i]<tr[c2][j]){
				tr[p].push_back(tr[c1][i]); i++; 
				ss[p].push_back(cur+tr[p].back()); 
				cur=ss[p].back(); 
			}	
			else {
				tr[p].push_back(tr[c2][j]); j++; 
				ss[p].push_back(cur+tr[p].back()); 
				cur=ss[p].back(); 
			}
		}
		while(i<sz(tr[c1])){
			tr[p].push_back(tr[c1][i]); i++; 
			ss[p].push_back(cur+tr[p].back()); 
			cur=ss[p].back(); 
		}
		while(j<sz(tr[c2])){
			tr[p].push_back(tr[c2][j]); j++; 
			ss[p].push_back(cur+tr[p].back()); 
			cur=ss[p].back(); 
		}
		for(int i:tr[p]){
			sum[p]+=i; 
		}
	}
}
ll agg=0; 
int mm; 
void query(int p, int l, int r, int i, int j, ll y){
	//if(agg>=y) return; 
	// cout<<p<<" " <<l<<" " <<r<<" " <<i<<" " <<j<<endl; 
	if(r<i || l>j) return; 
	if(i<=l && r<=j){
		int pos=upper_bound(all(tr[p]),mm)-tr[p].begin(); 	
		// for(int j:tr[p]) cout<<j<<" " ;  cout<<endl; 
		pos--; 
		if(pos>=0){
			agg+=ss[p][pos]; 	
		}
		return; 
	}
	int m=(l+r)>>1, c1=p<<1, c2=p<<1|1; 	
	query(c1,l,m,i,j,y); 
	query(c2,m+1,r,i,j,y); 
}

void solve(){
	int n; cin>>n; 
	for(int i=0;i<n;i++) cin>>a[i]; 
	build(1,0,n-1); 
	// int p=0; 
	// int j=1; 
	// while(p<4){
	// 	for(int i=0;i<(1<<p);i++){
	// 		cout<<sum[j+i]<<" " ; 
	// 	}
	// 	cout<<endl; 
	// 	j+=(1<<p); 
	// 	p++; 
	// }	
	int q; cin>>q; 
	while(q--){
		ll l,r,y;  
		cin>>l>>r>>y; 
		agg=0; 
		l--; r--; 
		int lo=0, hi=mod; 
		while((hi-lo)>1){
			mm=(lo+hi)>>1; 	
			agg=0; 
			query(1,0,n-1,l,r,y); 
			// cout<<mm<<" " <<agg<<endl; 
			// break; 
			if(agg>=y){
				hi=mm; 
			}
			else {
				lo=mm; 
			}
		}
		agg=0; 
		mm=hi; 
		query(1,0,n-1,l,r,y); 
		if(agg<y){
			cout<<-1<<endl; 
		}
		else {
			cout<<agg<<endl; 
		}
	}	
}

void pre(){
	int n; cin>>n; 
	string s; cin>>s; 
	if(n%2==0 && s.substr(0,n/2) == s.substr(n/2)){
		cout<<"Yes"<<endl; 
	}
	else {
		cout<<"No"<<endl; 
	}
}

int main(){
	pre(); 
}
//  [cpp]
#include <iostream>
#include <array>
#include <algorithm>
#include <map>
#include <vector>
#include <cmath>
#include <list>
#include <cmath>
#include <stack>
#include <queue>

#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
using namespace std;

const int mod = 1000000007;
struct mint {
	ll x; // typedef long long ll;
	mint(ll x = 0) :x((x% mod + mod) % mod) {}
	mint operator-() const { return mint(-x); }
	mint& operator+=(const mint a) {
		if ((x += a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator-=(const mint a) {
		if ((x += mod - a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator*=(const mint a) {
		(x *= a.x) %= mod;
		return *this;
	}
	mint operator+(const mint a) const {
		mint res(*this);
		return res += a;
	}
	mint operator-(const mint a) const {
		mint res(*this);
		return res -= a;
	}
	mint operator*(const mint a) const {
		mint res(*this);
		return res *= a;
	}
	mint pow(ll t) const {
		if (!t) return 1;
		mint a = pow(t >> 1);
		a *= a;
		if (t & 1) a *= *this;
		return a;
	}

	// for prime mod
	mint inv() const {
		return pow(mod - 2);
	}
	mint& operator/=(const mint a) {
		return (*this) *= a.inv();
	}
	mint operator/(const mint a) const {
		mint res(*this);
		return res /= a;
	}
};

struct combination {
	vector<mint> fact, ifact;
	combination(int n) :fact(n + 1), ifact(n + 1) {
		fact[0] = 1;
		for (int i = 1; i <= n; ++i) fact[i] = fact[i - 1] * i;
		ifact[n] = fact[n].inv();
		for (int i = n; i >= 1; --i) ifact[i - 1] = ifact[i] * i;
	}
	mint operator()(int n, int k) {
		if (k < 0 || k > n) return 0;
		return fact[n] * ifact[k] * ifact[n - k];
	}
} comb(2000005);

mint g(int r, int c) {
	return comb(r + c + 2, r + 1) - 1;
}

int main()
{
	int n;
	cin >> n;
	string s;
	cin >> s;
	if (n % 2 != 0)
	{
		cout << "No";
		return 0;
	}
	for (int i = 0; i < n / 2; i++)
	{
		if (s[i] != s[n / 2 + i])
		{
			cout << "No";
			return 0;
		}
	}
	cout << "Yes";
}
//  [c]
#include <stdio.h>

int main () {
	int n;
	scanf("%d", &n);
	char str[n];
	scanf("%s", &str);
	
	if (n % 2 != 0) {
		printf("No");
		return 0;
	}
	
	for (int i = 0; i < n / 2;i++) {
		if (str[i] != str[n / 2 + i]) {
			printf("No");
			return 0;
		}
	}
	printf("Yes");
	return 0;
}
//  [c]
//  cd Desktop/Atcoder
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define rep(i,n) for(i=0;i<(n);i++)
#define ll long long
#define ull unsigned long long
#define MOD 1000000007

int main(){
    int n,i;
    char s[102]={};
    scanf("%d",&n);
    scanf("%s",s);
    if (n%2!=0){
        printf("No");
        return 0;
    }
    rep(i,n/2){
        if (s[i]!=s[i+n/2]){
            printf("No");
            return 0;
        }
        
    }
    printf("Yes");
    return 0;
}
//  [c]
#include<stdio.h>
int main(){
  int n;
  char a[n+1];
  
  scanf("%d",&n);
  if(n%2!=0){
    printf("No");
    return 0;
  }
  scanf("%s",a);
  for(int i=0;i<n/2;i++){
    if(a[i]!=a[n/2+i]){
      printf("No");
      return 0;
    }
  }
  printf("Yes");
}
//  [javascript]
"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0]);
    const S = arg[1].split("");
    
    if(N % 2 !== 0) {
        console.log("No");
        return;
    }
    
    const front = S.slice(0, Math.floor(N / 2)).join("");
    const back  = S.slice(-Math.floor(N / 2)).join("");
    
    console.log(front === back ? "Yes" : "No");
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
"use strict"

const arg_str = require('fs').readFileSync('/dev/stdin', 'UTF-8')
const args = arg_str.split('\n')
const N = +args[0]
const S = args[1]

if(N < 2){
    console.log('No')
    return
}

if(S.substr(0, N/2) == S.substr(N/2)){
    console.log('Yes')
}else{
    console.log('No')
}
//  [javascript]
function Main(input) {
    var data = input.split("\n")
    var split = parseInt(data[0])/2;
	var cdn = [];
	for (var i = 0; i < data[1].length; i+=split) {
    	cdn.push(data[1].slice(i, i+split));
	}
	if(cdn[0]==cdn[1]) {
		console.log('Yes');
	}else{
		console.log('No');
	}
}

// Don't edit this line!
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

import "fmt"

func main() {
	var n int
	var s string
	fmt.Scan(&n, &s)

	if s[:n/2] == s[n/2:] {
		fmt.Println("Yes")
		return
	}
	fmt.Println("No")
}
//  [go]
package main

import "fmt"

func main() {
	var (
		n int
		s string
	)
	fmt.Scan(&n)
	fmt.Scan(&s)
	if n%2 != 0 {
		fmt.Print("No")
	} else if s[0:n/2] == s[n/2:n] {
		fmt.Print("Yes")
	} else {
		fmt.Print("No")
	}
}
//  [ruby]
n = gets.to_i
s = gets.chomp

ans = "No"

if s.length.even? && s[0..(s.length/2-1)] == s[s.length/2..-1]
  ans = "Yes"
end

puts ans
//  [ruby]
#!/usr/bin/env ruby

require 'set'

class Hash
  def push(key, value)
    self[key] = [] if self[key] == nil
    self[key].push(value)
  end
end

class Array
  def lower_bound(value)
    left = -1;
    right = self.length;
    while left + 1 < right
      mid = left + (right - left) / 2;
      if self[mid] >= value
        right = mid
      else
        left = mid
      end
    end
    right
  end

  def unique
    res = [self.first]
    each_cons(2) do |a, b|
      if a != b
        res.push(b)
      end
    end
    res
  end
end

def get_ints
  gets.chomp.split.map(&:to_i)
end

def get_ints_minus_one
  get_ints.map { |x| x - 1 }
end

def get_int
  gets.chomp.to_i
end

N = get_int
S = gets.chomp

if S[0...N/2] == S[N/2..]
  puts 'Yes'
else
  puts 'No'
end
//  [ruby]
n=gets.to_i
s=gets.chomp
if n%2!=0
  puts 'No'
  exit
end
puts s[0,n/2]==s[n/2...n] ? 'Yes' : 'No'
//  [rust]
use proconio::{fastout, input};

#[fastout]
fn main() {
    input! {n: usize, s: String};

    let s1 = &s[0..n / 2];
    let s2 = &s[n / 2..];

    if s1 == s2 {
        println!("Yes");
    } else {
        println!("No");
    }
}
//  [rust]
#[allow(unused_macros)]
macro_rules ! read_value {($ next : expr , ($ ($ t : tt ) ,* ) ) => {($ (read_value ! ($ next , $ t ) ) ,* ) } ; ($ next : expr , [$ t : tt ; $ len : expr ] ) => {(0 ..$ len ) . map (| _ | read_value ! ($ next , $ t ) ) . collect ::< Vec < _ >> () } ; ($ next : expr , chars ) => {read_value ! ($ next , String ) . chars () . collect ::< Vec < char >> () } ; ($ next : expr , usize1 ) => {read_value ! ($ next , usize ) - 1 } ; ($ next : expr , $ t : ty ) => {$ next () . parse ::<$ t > () . expect ("Parse error" ) } ; }
#[allow(unused_macros)]
macro_rules ! input_inner {($ next : expr ) => {} ; ($ next : expr , ) => {} ; ($ next : expr , $ var : ident : $ t : tt $ ($ r : tt ) * ) => {let $ var = read_value ! ($ next , $ t ) ; input_inner ! {$ next $ ($ r ) * } } ; }
#[allow(unused_macros)]
macro_rules ! input {(source = $ s : expr , $ ($ r : tt ) * ) => {let mut iter = $ s . split_whitespace () ; let mut next = || {iter . next () . unwrap () } ; input_inner ! {next , $ ($ r ) * } } ; ($ ($ r : tt ) * ) => {let stdin = std :: io :: stdin () ; let mut bytes = std :: io :: Read :: bytes (std :: io :: BufReader :: new (stdin . lock () ) ) ; let mut next = move || -> String {bytes . by_ref () . map (| r | r . unwrap () as char ) . skip_while (| c | c . is_whitespace () ) . take_while (| c |! c . is_whitespace () ) . collect () } ; input_inner ! {next , $ ($ r ) * } } ; }

fn main() {
    input! {
        n: usize,
        s_: String,
    }
    let s: Vec<char> = s_.chars().collect();

    if n % 2 == 1 {
        println!("No");
    } else {
        let mut flag = true;
        for i in 0..n / 2 {
            if s[i] != s[i + n / 2] {
                flag = false;
                break;
            }
        }
        if flag {
            println!("Yes");
        } else {
            println!("No");
        }
    }
}
//  [swift]
import Foundation

func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

let nk=readInts()
let n=nk[0]
let S=readLine()!

let index=S.index(S.startIndex,offsetBy:n/2)
let T1=S[..<index]
let T2=S[index...]

if (n%2==1)||(T1 != T2){
  print("No")
}else{
  print("Yes")
}
//  [swift]
import Foundation

class Scanner {
    static func readInt() -> Int {
        return Int(readLine()!)!
    }
    
    static func readIntArr() -> [Int] {
        return readLine()!.split(separator: " ").map { Int($0)! }
    }
    
    static func readM(_ n: Int) -> [[Int]] {
        var res = [[Int]]()
        for _ in 0..<n {
            res.append(readIntArr())
        }
        return res
    }
    
    static func readUknownIntMat() -> [[Int]] {
        var res = [[Int]]()
        while let line = readLine() {
            res.append(line.split(separator: " ").map { Int($0)! })
        }
        return res
    }
    
    static func readString() -> String {
        return readLine()!
    }
}

class Printer {
    static func printIntArray(_ arr: [Int]) {
        print(arr.map { String($0) }.joined(separator: " "))
    }
}

let n = Scanner.readInt()
let s = Scanner.readString()

class Solution {
    func echo(_ s: String) -> Bool {
        let s = Array(s)
        guard s.count%2 == 0 else {
            return false
        }
        for i in stride(from: 0, to: s.count/2, by: 1) {
            guard s[i] == s[s.count/2 + i] else {
                return false
            }
        }
        return true
    }
}

print((Solution().echo(s) ? "Yes" : "No"))