#include<bits/stdc++.h>
//cervello|Phoenix
using namespace std;
#define ll long long int
#define eb emplace_back
#define mk make_pair
#define all(x) x.begin(),x.end()
#define mod 1000000007
const int N = 1000005;

ll lpf[N], mobius[N]; 
void least_prime_factor() {
    for (int i = 2; i < N; i++) 
        if (!lpf[i]) 
            for (int j = i; j < N; j += i) 
                if (!lpf[j]) 
                    lpf[j] = i; 
} 
void Mobius() {
    for (int i = 1; i < N; i++) { 
        if (i == 1) 
            mobius[i] = 1; 
        else { 
            if (lpf[i / lpf[i]] == lpf[i]) 
                mobius[i] = 0; 
            else
                mobius[i] = -1 * mobius[i / lpf[i]]; 
        } 
    } 
} 
ll gcd_pairs(vector<ll> &a, int n) {
    ll maxi = 0; 
    ll fre[N] = { 0 }; 
    for (int i = 0; i < n; i++) { 
        fre[a[i]]++; 
        maxi = max(a[i], maxi); 
    } 
    least_prime_factor(); 
    Mobius(); 
    ll ans = 0; 
    for (int i = 1; i <= maxi; i++) { 
        if (!mobius[i]) 
            continue; 
        ll temp = 0; 
        for (int j = i; j <= maxi; j += i) 
            temp += fre[j]; 
        ans += temp * (temp - 1) / 2 * mobius[i]; 
    } 
    return ans; 
} 

int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n; cin>>n;
  vector<ll> a(n);
  ll gcd = 0;
  for(int i=0; i<n; i++){
    cin>>a[i];
    gcd = __gcd(gcd, a[i]);
  }
  ll ans = gcd_pairs(a, n);
  ll cnt = n*(n-1);
  cnt/=2;
  if(ans==cnt)
    cout<<"pairwise coprime\n";
  else if(gcd==1)
    cout<<"setwise coprime\n";
  else
    cout<<"not coprime\n";
  // cout<<ans<<"\n";
  return 0;
}