// 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);
}
signed main(){
  init_io();
  ll n,gv,ma_v=0;
  bool is_pair=true;
  cin >> n;
  vector<ll> a(n);
  set<ll> st;
  for(int i=0;i<n;i++){
    cin >> a[i];
    ma_v = max(a[i],ma_v);
  }
  vector<bool> lst(ma_v+1,false);
  for(int i=0;i<n;i++){
    ll tp = a[i];
    for(ll j=2;j*j<=tp;j++){
      ll cnt = 0;
      while(tp%j==0){
        cnt++;
        tp /= j;
      }
      if(cnt){
        if(lst[j]){
          is_pair = false;
          break;
        }else{
          lst[j] = true;
        }
      }
    }
    if(tp!=1&&lst[tp]){
      if(lst[tp]){
        is_pair = false;
      }else{
        lst[tp] = true;
      }
    }
    if(!is_pair){
      break;
    }
  }
  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;
  }
}
