#include<bits/stdc++.h>
using namespace std;
 
typedef long long ll;
const int N = 2000005;

bool np[N];
bool vstd[N];

int main(){
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	
	vector<long long> prims;
	prims.push_back(2);
	np[0] = np[1] = true;
	for(int i=4;i<N;i+=2) np[i] = true;
	for(int i=3;i<N;i+=2){
		if(!np[i]){
			prims.push_back(i);
			for(long long j= (ll)i*i;j<N;j+=i){
				np[j] = true;
			}
		}
	}
	
	int n;
	cin>>n;
	int gcd = 0;
	bool notcoprime = false;
	
	for(int j=0;j<n;j++){
		int x;
		cin>>x;
		gcd = __gcd(gcd,x);
		if(notcoprime)continue;
		for(int i=0;i<(int)prims.size();i++){
			if( prims[i] * prims[i] > x ) break;
			if(x%prims[i] == 0){
				if(vstd[i]) notcoprime = true;
				vstd[i] = true;
			}
			while(x%prims[i] == 0){
				x /= prims[i];
			}
		}
		if(x > 1){
			if(vstd[x]){
				notcoprime = true;
			}
			vstd[x] = true;
		}
	}
	
	if(gcd == 1 && notcoprime){
		cout<<"setwise coprime";
		return 0;
	}
	if(!notcoprime){
		cout<<"pairwise coprime";
		return 0;
	}
	cout<<"not coprime";
	
	return 0;
}
