//#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;}

vector<int> E(100001,1);

//AC(*'ω'*)AC(*'ω'*)AC(*'ω'*)AC(*'ω'*)AC(*'ω'*)AC(*'ω'*)AC
int main(){
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    
    int tmp;
    for(int i=2;i<=sqrt(100000);i++){
        if(E[i]){
            tmp=i;
            for(int j=i*2;j<100001;j+=tmp){
                E[j]=0;
            }
        }
    }
    bool pairwise=true;
    vector<int> pn(0);
    for(int i=2;i<100001;i++){
        if(E[i])pn.pb(i);
    }
    int n,x;cin>>n>>tmp;
    vector<int> vec(100001);
    for(int i=1;i<n;i++){
        cin>>x;
        tmp=__gcd(tmp,x);
        if(!pairwise)continue;
        for(int prime:pn){
            if(x<prime)break;
            if(x%prime==0){
                if(vec[prime])pairwise=false;
                vec[prime]++;
            }
        }
    }
    if(pairwise)cout<<"pairwise coprime"<<endl;
    else if(tmp==1)cout<<"setwise coprime"<<endl;
    else cout<<"not coprime"<<endl;
}
