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

int main(){
	int n;cin>>n;
	vector<long long> v(n);
	for(int i=0;i<n;i++) cin>>v[i];
	long long s=v[0];
	bool p=true;
	long long lcm=v[0]; 
	for(int i=1;i<n;i++){
		s = __gcd(s,v[i]);
		if( __gcd(lcm,v[i])==1 && p==true){
			lcm = lcm*v[i];
		}
		else{
			p=false;
			// cout<<v[i]<<endl;
		}

	}
	if(p) cout<<"pairwise coprime"<<endl;
	else if(s==1) cout<<"setwise coprime"<<endl;
	else
		cout<<"not coprime"<<endl;
}