#include <bits/stdc++.h>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
#define pll pair<ll,ll>
#define pint pll
using ll = long long;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;

vector<pair<ll,ll>> primeFactorDecomp(ll n){
      vector<pair<ll,ll>> ret;
      ll m=n;
      for(ll i=2;i*i<=m;i++){
            if(n%i!=0) continue;
            int cnt=0;
            while(n%i==0){
                  cnt++;
                  n/=i;
            }
            ret.push_back({i,cnt});
      }
      if(n>1){
            ret.push_back({n,1});
      }
      return ret;
}

int main(){
  int n;
  cin >> n;
  ll a[n];
  rep(i,n)cin >> a[i];
  ll g=a[0];
  rep(i,n)g=__gcd(g,a[i]);
  if(g!=1){
    cout << "not coprime" << endl;
    return 0;
  }
  vector<pair<ll,ll>> v=primeFactorDecomp(a[0]);
  rep(i,v.size()){
    bool ok=true;
    rep(j,n){
      if(a[j]%(v[i].first)!=0){
        ok=false;
      }
      if(!ok)break;
    }
    if(ok){
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  cout << "pairwise coprime" << endl;
return 0;}