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

#define REP(i, n) for(int (i) = 0; (i) < (n); ++(i))
#define REPR(i, n) for(int (i) = (n); (i) >= 0; --(i))
#define FOR(i, n, m) for(int (i) = (n); (i) < (m); ++(i))

// constexpr int INF = 1e9;
constexpr ll INF = 1LL<<61;
constexpr ll mod = 1e9+7;

int main(){
  int N;
  cin >> N;
  vector<int> A(N);
  REP(i, N){
    cin >> A[i];
  }
  ll all_gcd = A[0];
  REP(i, N){
    all_gcd = gcd(all_gcd, A[i]);
  }
  map<int, int> l;
  bool isPair = true;
  REPR(i, N-1){
    for(ll x = 2; x * x <= A[i]; x++){
      int cnt = 0;
      while(A[i] % x == 0){
        if(l[A[i]/x] > cnt){
          isPair = false;
        }
        cnt++;
        l[A[i]/x]++;
        A[i]/=x;
      }
    }
    if(A[i] != 1){
      if(l[A[i]] > 0){
        isPair = false;
      }
      l[A[i]]++;
    }
  }
  if(isPair){
    cout << "pairwise coprime" << endl;
  }
  else if(all_gcd ==  1){
    cout << "setwise coprime" << endl;
  }
  else{
    cout << "not coprime" << endl;
  }
  return 0;
}
