#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vb = vector<bool>;
using vl = vector<long>;
using vs = vector<string>;
using vvi = vector<vector<int>>;
using vvb = vector<vector<bool>>;
using vvc = vector<vector<char>>;
using vvl = vector<vector<long>>;
using pii = pair<int, int>;
using pil = pair<int, long>;
using pll = pair<long, long>;
#define fix20 cout << fixed << setprecision(20)
#define YES cout << "Yes" << endl
#define NO cout << "No" << endl
#define rep(i,n) for(int i=0; i<(int)(n);i++)
#define REP(i,s,t) for(int i=s; i<t; i++)
#define RNG(i,s,t,u) for(int i=s; i<t; i+=u)
#define MOD 1000000007
#define all(vec) vec.begin(), vec.end()
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

vector<bool> prime_vec(long n){ //2からnまでの素数を列挙した配列
    vector<bool> vec(n,true);
    vec.at(0) = false;
    vec.at(1) = false;
    for(int i=2; i<n; i++){
        if(vec.at(i)){
            for(int j=2; i*j<n; j++){
                vec.at(i*j) = false;
            }
        }
    }
    return vec;
}

int main(){
  int n;
  cin >> n;
  vl a(n);
  rep(i,n) cin >> a.at(i);
  vb isprime = prime_vec(1000010);
  vb primeref = prime_vec(1000010);
  bool flag = false;
  rep(j,n){
    long tmp = a.at(j);
    for(int i=2;i<=min(tmp,(long)sqrt(a.at(j)+1));i++){
      if(!primeref.at(i)) continue;
      if(tmp % i == 0){
        while(tmp % i == 0){
          tmp /= i;
        }
        if(isprime.at(i)){
          isprime.at(i) = false;
        }else{
          flag = true;
          break;
        }
      }
    }
    if(flag) break;
  }

  if(!flag){
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long g = __gcd(a.at(0), a.at(1));
  rep(i,n){
    g = __gcd(a.at(i), g);
  }
  if(g == 1) cout << "setwise coprime" << endl;
  else cout << "not coprime" << endl;
}