#include<bits/stdc++.h>

using namespace std;

int main() {
    int n;
    cin>>n;
    long long int a[n];
    for(int i = 0; i < n; i++) {
        cin>>a[i];
    }
    long long int pg, sg = a[0], cpg = 0;
    for(int i = 0; i < n-1; i++) {
        pg = __gcd(a[i], a[i+1]);
        if(pg == 1){
            cpg++;
        }
        sg = __gcd(sg, a[i+1]);
    }
    if(cpg == n-1) {
        cout<<"pairwise coprime"<<endl;
    } else if(sg == 1) {
        cout<<"setwise coprime"<<endl;
    } else {
        cout<<"not coprime"<<endl;
    }
    return 0;
}