#include <bits/stdc++.h>
#include <random>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define rep1(i,n) for (int i = 1; i <= (n); ++i)

using namespace std;
using ll = long long;
using P = pair<ll,ll>;
using ull= unsigned long long;
const ll K_MAX=1e5+5;
const ll Lmax=ll(1e18);
const int Nmax=2e5+1;
const int Nd=61;
const int INF=1e5;

// GCD, LCM
// https://youtu.be/8lm8o8L9Bmw?t=2285
// https://youtu.be/XI8exXVxZ-Q?t=3595
// https://youtu.be/F2p_e6iKxnk?t=843
ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;} //最大公約数
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;} //最小公倍数


vector<pair<long long, long long> > prime_factorize(long long N) {
    vector<pair<long long, long long> > res;
    for (long long a = 2; a * a <= N; ++a) {
        if (N % a != 0) continue;
        long long ex = 0; // 指数

        // 割れる限り割り続ける
        while (N % a == 0) {
            ++ex;
            N /= a;
        }

        // その結果を push
        res.push_back({a, ex});
    }

    // 最後に残った数について
    if (N != 1) res.push_back({N, 1});
    return res;
}


int main(){
  ll n; cin>>n;
  vector<ll> a(n);
  bool pc=true, sc=true;
  ll sgcd;
  int temp;
  int minP=2;
  bool furui=false;
  ll ex=0;
  vector<bool> exist(1010101,false);
  rep(i,n){
    cin>>a[i];
    if(i==1){
      sgcd=gcd(a[0],a[1]);
    }
    if(i>1){
      sgcd=gcd(sgcd,a[i]);
    }
    temp=a[i];
    vector<pair<ll,ll>> res;
    furui=false;
    if(pc){
      for (ll k=minP; k*k<=temp;k++){
        if(temp%k!=0) continue;

        if(!furui){
          minP=min(minP,k);
          furui=true;
        }
        while(temp %k ==0){
          temp /=k;
        }

        if(exist[k]){
          pc=false;
        }else{
          exist[k]=true;
        }
      }


    }


  }

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

  if(sgcd==1){
    cout<<"setwise coprime"<<endl;
    return 0;

  }
  cout<<"not coprime"<<endl;



}
