//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define str to_string
#define endl "\n"
#define PI 3.141592653589
using namespace std;
using lint = long long;
template <class T>ostream &operator<<(ostream &o,const vector<T>&v)
{o<<"{";for(int i=0;i<(int)v.size();i++)o<<(i>0?", ":"")<<v[i];o<<"}";return o;}

map<lint,int> p_factorization(lint n){
    map<lint,int> soinsu;
    for(int i=2;i<=sqrt(n);i++){
        while(n%i==0){
            n/=i;
            soinsu[i]++;
        }
    }
    if(n!=1)soinsu[n]++;
    return soinsu;
}

//AC(*'ω'*)AC(*'ω'*)AC(*'ω'*)AC(*'ω'*)AC(*'ω'*)AC(*'ω'*)AC
int main(){
    bool pairwise=true;
    vector<int> vec(1000000);
    int n,x,tmp;cin>>n;
    cin>>tmp;
    map<lint,int> dic=p_factorization(tmp);
    for(auto p:dic){
        vec[p.first]=1;
    }
    for(int i=1;i<n;i++){
        cin>>x;tmp=__gcd(tmp,x);
        map<lint,int> dic=p_factorization(x);
        if(!pairwise)continue;
        for(auto p:dic){
            if(vec[p.first]==1){
                pairwise=false;
            }
            vec[p.first]=1;
        }
    }
    if(pairwise)cout<<"pairwise coprime"<<endl;
    else if(tmp==1)cout<<"setwise coprime"<<endl;
    else cout<<"not coprime"<<endl;
}
