#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> PP;
#define MOD 1000000007
//#define MOD 998244353
#define INF 2305843009213693951
//#define INF 810114514
#define PI 3.141592653589
#define setdouble setprecision
#define REP(i,n) for(ll i=0;i<(n);++i)
#define OREP(i,n) for(ll i=1;i<=(n);++i)
#define RREP(i,n) for(ll i=(n)-1;i>=0;--i)
#define all1(i) begin(i),end(i)
#define GOODBYE do { cout << "0" << endl; return 0; } while (false)
#define MM <<" "<<
#define Endl endl
#define debug false
#define debug2 false

//素因数分解
std::vector<long long> prime_factorization(long long N){
    /*
    Copyright (c) 2020 0214sh7
    https://github.com/0214sh7/library/
    */
  std::vector<long long> R;
  if(N<2)return R;
  for(long long i=2;i*i<=N;i++){
      while(N%i==0){
          R.push_back(i);
          N/=i;
      }
  }
  if(N!=1){
        R.push_back(N);
  }
  return R;
}

int main(void){
    ll N,a;
    vector<ll> A;
    cin >> N;
    REP(i,N){
        cin >> a;
        A.push_back(a);
    }
    
    ll g=A[0];
    REP(i,N){
        g=gcd(g,A[i]);
    }
    
    if(g!=1){
        cout << "not coprime" << endl;
        return 0;
    }
    
    vector<bool> visited(1000000,false);
    bool ok = true;
    
    vector<ll> Pri;
    REP(i,N){
        Pri = prime_factorization(A[i]);
        REP(j,Pri.size()){
            if(j!=0 || Pri[j]==Pri[j-1])continue;
            if(!visited[Pri[j]]){
                visited[Pri[j]]=true;
            }else{
                ok = false;
                break;
            }
        }
        if(!ok)break;
    }
    
    if(ok){
        cout << "pairwise coprime" << endl;
    }else{
        cout << "setwise coprime" << endl;
    }
    
    return 0;
}

