#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int64_t MOD=1000000007;
const long long INF = 1LL<<60;


bool soin(set<int64_t> &prime, int64_t x){
  int64_t N=x, temp=0;
  for (int64_t i=2;i*i<=N;i++){
    
    if(x%i==0){
      temp++;
      if(prime.count(i)){
      prime.erase(i);
      }
      else{
        return false;
      }
      while(x%i==0)x/=i;
    }
  }
  if(temp==0){
    if(prime.count(N)){
      prime.erase(N);
    }
    else{
      return false;
    }
  }
  return true;
}

int main() {
  //準備
  int64_t MAX=1000001;
  vector<bool> Prime(MAX,true);
  for(int64_t i=2;i*i<MAX;i++){
    if(Prime[i]){
      int64_t k=2;
      while(i*k<=MAX){
        Prime[i*k]=false;
        k++;
      }
    }
  }
  
  set<int64_t> prime;
  for(int64_t i=2;i<MAX;i++){
    if(Prime.at(i)){
      prime.insert(i);
    }
  }
     
  //処理
  bool coprime=true;
  int64_t N,total; cin>>N;
  rep(i,N){
    int64_t K; cin>>K;
    if(coprime){
      bool temp=soin(prime,K);
      if(!temp){
        coprime=false;
      }
    }
    if(i==0) total=K;
    else if(total>1) total=gcd(total,K);
  }
  
  //出力
  if(coprime) cout<<"pairwise coprime";
  else if(total==1) cout<<"setwise coprime";
  else cout<<"not coprime";
}
