#include "bits/stdc++.h"
using namespace std;
#pragma GCC optimize "trapv"
#define pb push_back
#define fi first
#define se second
#define all(container) container.begin(),container.end()
#define fast ios::sync_with_stdio(0); cin.tie(0)
#ifndef ONLINE_JUDGE
#include "debug.cpp"
#endif
#define int long long
const int mod = 1e9+7;  
int power(int a,int b) { if(b==0) return 1; int res = power(a,b/2); if(b&1) return res * res * a; else return res * res; }


const int sz = 1e6+1;
int SPF[sz] , mp[sz];
vector<int> divisor;
 
void spf(){
  for(int i=2;i*i<=sz;i++){
    for(int j=i;j<sz;j+=i) if(SPF[j]==0) SPF[j] = i;
  }
  for(int i=1;i<sz;i++) if(SPF[i]==0) SPF[i] = i;   
}
 
vector<pair<int,int>> primeFactorization(int n){
  vector<pair<int,int>> v;
  while(n!=1){
  int smallest_prime = SPF[n];
  int c = 0;
  while(n%smallest_prime==0){
    c++;
    n/=smallest_prime;
  }
  v.pb({smallest_prime,c});
  }
 
  return v;
}
 
void generateDivisor(vector<pair<int,int>>& pf,int pos,int current_divisor){
  if(pos==pf.size()){
    divisor.pb(current_divisor);
  }else{
    for(int i=0;i<=pf[pos].second;i++){
      generateDivisor(pf,pos+1,current_divisor);
      current_divisor*=pf[pos].first;
    }
  }
}

int32_t main(){
    
  fast;
  spf();
  int n; cin >> n;
  int ar[n] = {0};

  for(int i=0;i<n;i++){
    cin >> ar[i];
  }

  unordered_map<int,int> mp;

  for(int i=0;i<n;i++){
    int num = ar[i];
    vector<pair<int,int>> pf = primeFactorization(num);
    divisor.clear();
    generateDivisor(pf,0,1);
    for(int k : divisor) mp[k]++;
  }

  bool flag = true;
  for(auto p  : mp){
    if(p.first>1&&p.second>1){
      flag = false;
      break;
    }
  }

  if(flag){
    cout << "pairwise coprime\n";
  }else{
    int g = __gcd(ar[0],ar[1]);
    for(int i=2;i<n;i++) g = __gcd(g,ar[i]);
    if(g==1){
      cout << "setwise coprime\n";
    }else{
      cout << "not coprime\n";
    }
  }

  return 0;
}