#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;
    std:vector<int> pre(n+1);
    int GCD=0;
    for(int i=1;i<=n;i++) {
    	cin>>pre[i];
    	GCD=__gcd(GCD,pre[i]);
    }
    if(GCD!=1) {cout<<"not coprime\n";return 0;}
    if(n>80000) {cout<<"setwise coprime";return 0;}
    bool ok=1;
    for(int i=1;i<=n;i++) {
    	int now=pre[i];
    	for(int j=2;j*j<now;j++) {
    		if(now%j==0) {
    			if(M[j]) {ok=0;break;}
    			M[j]++;
    			while(now%j==0) now/=j;
    		}
    	}
    	if(!ok) break;
    	if(now!=1) {
    		if(M[now]) {
    			ok=0;break;
    		}
    		M[now]++;
    	}
    }
    if(!ok) cout<<"setwise coprime\n";
    else cout<<"pairwise coprime\n";
    return 0;
}