// I SELL YOU...! 
#include<iostream>
#include<vector>
#include<algorithm>
#include<functional>
#include<queue>
#include<chrono>
#include<iomanip>
#include<map>
#include<set>
#include<numeric>
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
using TP = tuple<ll,ll,ll>;
void init_io(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(18);
}
vector<ll> eratos(int max){
  vector<ll> res;
  vector<bool> cp_list(max+1,true);
  cp_list[0]=false;
  cp_list[1]=false;
  for(ll i=2;i<=max;i++){
    if(cp_list[i]){
      res.push_back(i);
      for(ll j=2;j*i<=max;j++){
        cp_list[i*j]=false;
      }
    }
  }
  return res;
}
signed main(){
  init_io();
  ll n,gv,ma_v=0;
  bool is_pair=true;
  cin >> n;
  vector<ll> a(n);
  set<ll> st;
  vector<ll> prime = eratos(1e6+5);
  ll m = prime.size();
  vector<bool> cp(m,false);
  for(int i=0;i<n;i++){
    cin >> a[i];
    ma_v = max(a[i],ma_v);
  }
  for(int i=0;i<n;i++){
    ll tmp = a[i];
    for(int j=0;j<m;j++){
      if(prime[j]>tmp){
        break;
      }
      if(tmp%prime[j]==0){
        while(tmp%prime[j]==0){
          tmp /= prime[j];
        }
        if(cp[j]){
          is_pair = false;
          break;
        }else{
          cp[j] = true;
        }
      }
    }
  }
  gv = a[0];
  for(int i=1;i<n;i++){
    gv = gcd(gv,a[i]);
  }
  if(is_pair){
    cout << "pairwise coprime"<<endl;
  }else if(gv==1){
    cout << "setwise coprime"<<endl;
  }else{
    cout <<"not coprime"<<endl;
  }
}
