//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#include <algorithm>
#define rep(i,n) for(int i=0;i<(n);++i)
#define all(a) (a).begin(),(a).end()
using namespace std;
using Graph = vector<vector<int>>;
typedef long long ll;
const int mod =1e+9+7;

const int dy[4]={0,1,0,-1};
const int dx[4]={1,0,-1,0};
const ll INF=1e10;

int main(){
    ll n; cin>>n;
    vector<ll>a(n);
    rep(i,n)cin>>a[i];
    vector<ll>amul(n-1);
    amul[0]=a[n-1];
    for(ll i=1;i<n-1;i++){
        amul[i]=amul[i-1]*a[n-1-i];
        amul[i]%=mod;
    }
    /*rep(i,n-1){
        cout<<amul[i]<<endl;
    }*/
    reverse(amul.begin(),amul.end());

    ll cnt=0;
    rep(i,n-1){
        ll ggcd=__gcd(a[i],amul[i]);
        if(ggcd==1)cnt++;
        else break;
    }
    //cout<<cnt<<endl;
    if(cnt==n-1){
        cout<<"pairwise coprime"<<endl;
        return 0;
    }
    ll GGCD=__gcd(a[0],a[1]);
    if(GGCD==1){
        cout<<"setwise coprime"<<endl;
        return 0;
    }
    rep(i,n-2){
        GGCD=__gcd(GGCD,a[i+2]);
         if(GGCD==1){
        cout<<"setwise coprime"<<endl;
        return 0;
    }
    }
    cout<<"not coprime"<<endl;
}











































































