#include<bits/stdc++.h>
using namespace std;

int main(){
    int N;
    cin>>N;
    vector<int> a(N);
    bool not_pw = false;
    while(N--) cin>>a[N];
    for(int i = 0;i<a.size()-1;++i){
        for(int j = i+1;j<a.size();++j){
            if(__gcd(a[i],a[j]) !=1){
                not_pw = true;
                cout<<a[i]<<' '<<a[j]<<endl;
                break;
            }
        }
        if(not_pw) break;
    }
    int GCD_all = accumulate(a.begin()+1, a.end(), a[0], [](int p, int c){return __gcd(p,c);});
    bool not_all= true;;
    
    if(GCD_all == 1){
        not_all = false;
    }
    if(not_all and not_pw){
        cout<<"not ";
    }else if(not not_pw){
        cout<<"pairwise ";
    }else{
        cout<<"setwise ";
    }
    cout<<"coprime";
}