#include <bits/stdc++.h>
using namespace std;
 
int main(){
    int N;
    cin >> N;
    int A[N], g;
    for(int i=0;i<N;i++){
        cin >> A[i];
        if(i == 0)
            g = A[i];
        g = gcd(g, A[i]);
    }
        
    // pairwise coprime
    bool pc = true;
    for(int i=0;i<N;i++){
        // 1 <= i < j <= N
        for(int j=i+1;j<N;j++){
            if(gcd(A[i], A[j]) != 1)
                pc = false;
                break;
        }
    }
    if(pc){
        cout << "pairwise coprime" << endl;
    }else if(g == 1){
        cout << "setwise coprime" << endl;
    }else{
        cout << "not coprime" << endl;
    }

}