# include <bits/stdc++.h>
# define sz(x) (int)((x).size())
# define F first
# define S second
# define pb push_back
# define ub upper_bound
# define lb lower_bound
# define all(x) x.begin(), x.end()
# define pqueue priority_queue
# define mset multiset
# define umap unordered_map
# define Speed() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
# define rep(i,n) for(int i=0;i<n;++i)
# define forn(i,n) for(int i=1;i<=n;++i)
# define lr(i,l,r) for(int i=l;(l>r?i>=r:i<=r);(l>r?--i:++i))

using namespace std;

template<class T> void umin(T &a,T b){a=min(a,b);}
template<class T> void umax(T &a,T b){a=max(a,b);}

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

const int dx[]={1,0,-1,0,-1,-1,1,1},dy[]={0,1,0,-1,-1,1,-1,1}; 
const int mod = 1e9+7;
const ll N = 1e6+4;

int used[N];

void solve(){
	int n;
	cin>>n;
	int a[n];
	int g=0;
	rep(i,n){
		cin>>a[i];
		g=__gcd(g,a[i]);
	}
	if(g>1){
		cout<<"not comprime";
		return;
	}
	bool yes=1;
	rep(i,n){
		bool ok=1;
		for(int j=1;j*j<=a[i];j++){
			if(a[i]%j==0){
				if(j>1 && used[j]){
					ok=0;
					break;
				}
				else{
					used[j]=1;
				}
				if(a[i]/j!=j){
					if(a[i]/j>1 && used[a[i]/j]){
						ok=0;
						break;
					}
					else used[a[i]/j]=1;
				}
			}
		}
		if(!ok){
			yes=0;
			break;
		}
	}
	cout<<(yes?"pairwise comprime":"setwise comprime");
}

int main(){
	Speed();
	int T=1; 
	//cin>>T;	
	while(T--)
		solve();
	return 0;
}