#include <bits/stdc++.h>
using namespace std;
 
int main(){
    int N;
    cin >> N;
    int A[N], g, h = 0, d[1000000 + 1] = {};
    bool pc = true;
    for(int i=0;i<N;i++){
        cin >> A[i];
        if(i == 0)
            g = A[i];
        else
            h = gcd(A[i-1], A[i]);
        g = gcd(g, A[i]);
        if(i != 0 && h != 1)
            pc = false;
    }

    if(pc){
        cout << "pairwise coprime" << endl;
    }else if(g == 1){
        cout << "setwise coprime" << endl;
    }else{
        cout << "not coprime" << endl;
    }

}