#include<bits/stdc++.h>
#define rep(i, n) for(int i=0; i<n; i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int NUM=1000005;

int main(){
    int N;
    cin >> N;
    int A[N];
    int number[NUM]={0};
    rep(i, N){
        cin>>A[i];
        number[A[i]]++;
    }

    rep(i, NUM){
        int cnt=0;
        for(int j=i; j<NUM; j++){
            cnt+=number[i];
        }
        if(cnt>=2){
            cout<<"pairwise coprime"<<endl;
            return 0;
        }
    }

    int gc=A[0];
    rep(i, NUM){
        gc=gcd(gc, A[i]);
    }
    if(gc==1){
        cout<<"setwise coprime"<<endl;
        return 0;
    }

    cout<<"not coprime"<<endl;
    return 0;
}