#include <bits/stdc++.h>
/*#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>*/
 
#define pll              pair <long long,long long>
#define pb               push_back
#define ll               long long
#define ff               first
#define ss               second
#define D(x)             cerr<<#x " = "<<(x)<<endl
#define vll              vector <ll>
#define IOS              ios_base::sync_with_stdio(0); cin.tie(NULL);
#define endl             '\n'   
using namespace std;

ll gcd (ll a, ll b) {
return b ? gcd (b, a % b) : a;
}

int main()
{
    IOS
 	// freopen("input.txt","r",stdin);
 	// freopen("output.txt","w",stdout);
 	// freopen("error.txt","w",stderr);
	ll n;
	cin>>n;
	ll a[n];
	bool f[1000001]={0};
	bool vis[1000001]={0};
	ll gc=0;
	bool hmo=false;
	for(ll& x:a)
	{
		cin>>x;
		if(!f[x])
			f[x]=true;
		else if(x>1)
			hmo=true;
		gc=gcd(gc,x);
	}
	for(ll i=2;i<1000001;i++){
		if(vis[i])
			continue;
		ll cnt=f[j];
		for(ll j=2*i;j<1000001;j+=i){
			vis[j]=true;
			if(f[j])
				cnt++;
		}	
		if(cnt>=2 || hmo){
			if(gc==1)
			{
				cout<<"setwise coprime"<<endl;
				return 0;
			}
			else
			{
				cout<<"not coprime"<<endl;
				return 0;
			}
		}
	}
	cout<<"pairwise coprime"<<endl;
    return 0;
}