#include<bits/stdc++.h>
#define ll long long
using namespace std;

// const int N = 1e9+7;
const int N = 1e6 + 5;
ll parent[N];
ll siz[N];
void make() {
    for(ll i=0; i<N; i++) {
        parent[i] = i;
        siz[i] = 1;
    }
}
int find(int x) {
    while (parent[x] != x) {
        x = parent[x];
    }
    return x;
}
void unite(int a, int b) {
    a = find(a);
    b = find(b);
    if (a != b) {
        if (siz[a] < siz[b]) {
            swap(a, b);
        }
        parent[b] = a;
        // if (siz[a] == siz[b]) {
            siz[a]+=siz[b];
        // }
    }
}

bool sieve[N];

void solve(){
  ll n;
  cin>>n;
  vector<ll>v(n);
  for(ll i=0;i<n;i++){
    cin>>v[i];
  }
  ll gc = v[0];
  for(ll i=1; i<n;i++){
    gc = __gcd(v[i],gc);
  }
  if(gc > 1){
    cout<<"not coprime\n";
    return;
  }
  vector<ll>primes;
  for(ll i=2; i<(ll)sqrt(N)+1; i++){
    if(sieve[i])continue;
    for(ll j=i+i; j<N; j+=i){
      sieve[j] = true;
    }
  }
  for(ll i=2; i<N; i++){
    if(sieve[i])continue;
    primes.push_back(i);
  }
  for(auto y:primes){
    ll cnt = 0;
    for(auto z:v){
      if(z%y == 0){
        cnt++;
      }
    }
    if(cnt > 1){
      cout<<"setwise coprime\n"; return;
    }
  }
  cout<<"pairwise coprime";

}



int main(){
  // freopen("input.txt", "r",stdin);
  // freopen("output.txt", "w", stdout);
  ll t;
  // cin>>t;
  t = 1;
  while(t--){
    solve();
  }
}
























/*
  1 2 3 4 5 6 7 8

  6 7 8 1 2 3 4 5


*/
