#include <bits/stdc++.h>
#define REP(i,n) for (int i = 0; i <(n); ++i)
#define REP2(i,x,n) for (int i = x; i <(n); ++i)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
using namespace std;
using ll = long long;
using P = pair<int,int>;
static const double PI = acos(-1);
static const int INF = 1e9+7;
//debug 
#ifdef _DEBUG
#define debug(var)  do{cout << #var << " :";view(var);}while(0)
#else
#define debug(...)
#endif
template<typename T> void view(T e){cout << e << endl;}
template<typename T> void view(const vector<T>& v){for(const auto& e : v){ cout << e << " "; } cout << endl;}
template<typename T> void view(const vector<vector<T> >& vv){ for(const auto& v : vv){ view(v); } }

int isprime[1000100];

void Eratos(int n){
  int i;
  ++n;
  //int isprime[n];
  for(i = 0; i < n; i++){
    isprime[i] = 1;
  }

  isprime[0] = isprime[1] = 0;

  for(i = 2; i*i <= n; ++i){
    if(isprime[i]){
      int j = i + i;
      while(j <= n){
        isprime[j] = 0; //iの倍数を除去
        j = j + i;
      }
    }
  }
  // for(i = 0; i <= n; i++){
  //   if(isprime[i]) cout << i << endl;
  // }

}

int main(){
  int n;
  cin >> n;
  int nmax = 1000100;
  Eratos(nmax);
  vector<int> a(n);
  sort(ALL(a));
  REP(i,n) cin >> a[i];
  sort(ALL(a));

 
  vector<int> v1;
  v1.push_back(a[0]);
  REP2(i,1,n){
    if(a[i] == a[i-1]) continue;
    v1.push_back(a[i]);
  }

  //or(auto x: v1) cout << x << endl;

  vector<int> v;
  REP(i,v1.size()){
    if(isprime[v1[i]] == 1) continue;
    v.push_back(v1[i]);
  }

  // REP(i,10) cout << i << ":"<< isprime[i] << endl;
  // for(auto x: v) cout << x << endl;
  bool ok = true;
    REP(i,v.size()){
      REP2(j,i+1,v.size()){
        if(__gcd(v[i],v[j])) ok = false;
      }
    }
  

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

  int gcdst = a[0];
  REP2(i,1, n){
    gcdst = __gcd(gcdst,a[i]);
  }
  if(gcdst == 1) cout << "setwise coprime" << endl;
  else cout << "not coprime" << endl;

  return 0;
}