#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
const int maxn=1e6+5;
int main() {
    int n;cin>>n;
    map<int,int> M;
    vector<int> pre(n+1);
    vector<int> cnt(maxn);
    int GCD=0;
    for(int i=1;i<=n;i++) {
        cin>>pre[i];cnt[pre[i]]++;
        GCD=__gcd(GCD,pre[i]);
    }
    if(GCD!=1) {cout<<"not coprime\n";return 0;}
    if(n>80000) {cout<<"not coprime\n";return 0;}
    bool ok=1;
    for(int i=2;i<maxn;i++) {
        int tot=0;
        for(int j=i;j<maxn;j+=i) {
            tot+=cnt[j];
        }
        if(tot>1) {ok=0;break;}
    }   
    if(!ok) cout<<"setwise coprime\n";
    else cout<<"pairwise coprime\n";
    return 0;
}
