#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <cstring>

using namespace std;

const int N=1000010;
bool v[N],ok[N];
int n,a[N];

void get_prime(int x){
	memset(v,0,sizeof v);
	v[1]=1;
	for(int i=2;i<=x;i++){
		if(v[i]) continue;
		for(int j=2*i;j<=x;j+=i) v[j]=1;
	}
}

int main(){
    cin>>n;
    for(int i=1;i<=n;i++) cin>>a[i];
    if(n>=200000) {
    	int ans=a[1];
    	for(int i=2;i<=n;i++) ans=__gcd(ans,a[i]);
    	if(ans==1) cout<<"setwise coprime";
    	else cout<<"not coprime";
    	return 0;
	}
	bool All_ok=true;
    get_prime(1000000);
//    cout<<v[1]<<" "<<v[2]<<" "<<v[3]<<" "<<v[5]<<endl;
    for(int i=1;i<=n;i++) {
    	int tmp=a[i];
    	for(int j=1;j*j<=tmp;j++)
    	    if(tmp%j==0) {
    	    	if(!v[j]){
    	    	    if(ok[j]!=1) ok[j]=1;
    	    	    else All_ok=false;
			    }
			    if(j*j==tmp) continue;
			    if(!v[tmp/j]){
    	    	    if(ok[tmp/j]!=1) ok[tmp/j]=1;
    	    	    else All_ok=false;  	
				}
			}
		if(All_ok==false) break;
	}
	if(All_ok) {
		cout<<"pairwise coprime";
		return 0;
	}
    int ans=a[1];
    for(int i=2;i<=n;i++) ans=__gcd(ans,a[i]);
    if(ans==1) cout<<"setwise coprime";
    else cout<<"not coprime";
	return 0;
}