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

const int mod = 1e9+7;

const int N = 200200;

signed main(){
    ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);

    int n;
    cin>>n;
    int a[n];
    for (int i=0; i<n; i++) cin>>a[i];

    int pairwise = 1;
    for (int i=0; i<n; i++){
        bool ok = 1;
        for (int j=i+1; j<n; j++){
            ok &= (__gcd(a[i], a[j])==1);
        }
        pairwise &= ok;
    }

    if (pairwise) {
        cout<<"pairwise coprime"<<endl;
    }
    else {
        int g = a[0];
        for (int i=1; i<n; i++){
            g = __gcd(g, a[i]);
        }
        if (g==1){
            cout<<"setwise coprime"<<endl;
        }
        else{
            cout<<"not coprime"<<endl;
        }
    }

    return 0;
}
