#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <stack>
#include <vector>

using namespace std;

using Pair = pair<int, int>;
using lint = long long;

// const int mod = 1e9 + 7;
// const int mod = 998244353;

template <typename T> vector<T> make_v(size_t a) { return vector<T>(a); }

template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) {
  return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...));
}
#define rep(i, n) for (int i = 0; i < (n); i++)
// 2数の最大公約数,O(log max(a,b))
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
// 2数の最小公倍数,O(log max(a,b))
long long lcm(long long i, long long j) {
  return i * (j / gcd(i, j));
}
int main(){
  int n;
  cin>>n;
  vector<int> a(n);
  rep(i,n)cin>>a[i];
  vector<int> prime;
  for(int i=2;i<=1000000;i++){
    bool is=true;
    for(int j=0;j<prime.size();j++){
      if(i%prime[j]==0){
        is=false;
        break;
      }
      if(prime[j]*prime[j]>i)break;
    }
    if(is)prime.push_back(i);
  }
  vector<bool> inc(prime.size(),false);
  bool ret1=true,ret2=true;
  //cout<<prime.size()<<endl;
  rep(j,n){
    rep(i,prime.size()){
      if(a[j]%prime[i]==0){
        if(inc[i]==false){
          inc[i]=true;
          int idx = lower_bound(
              prime.begin(), prime.end(),
              a[j] / prime[i])-prime.begin() ;
          if (idx<prime.size()&&prime[idx]==a[j]/prime[i]&&prime[idx]*prime[idx]!=a[j]){
            if(prime[idx]==true)ret1=false;
            else prime[idx]=true;
          }
        }
        else {
          ret1=false;
          break;
        }
      }
      if(prime[i]*prime[i]>a[j])break;
    }
  }
  int gc=a[0];
  rep(i,n)gc=gcd(gc,a[i]);
  if(gc!=1)ret2=false;
  if (ret1) cout << "pairwise coprime"<<endl;
  else if(ret2)
    cout << "setwise coprime"<<endl;
    else
      cout << "not coprime"<<endl;
}
