#include<bits/stdc++.h>
using namespace std;
#define MOD 1000000007
//#define MOD 998244353
#define INF 1000000010
#define EPS 1e-9
#define F first
#define S second

#define debug(x) cout<<x<<endl;
#define repi(i,x,n) for(int i=x;i<n;i++)
#define rep(i,n) repi(i,0,n)
#define lp(i,n) repi(i,0,n)
#define repn(i,n) for(int i=n;i>=0;i--)
#define int long long
#define endl "\n"

typedef pair<int,int> PII;
typedef pair<int,string> PIS;
typedef pair<string,int> PSI;



signed main(){
  cin.tie(0);	
  ios::sync_with_stdio(false);
  int n;
  cin>>n;
  int a[n];
  rep(i,n) cin>>a[i];
  int gcdd=gcd(a[0],a[1]);
  map<int,int> mp;
  bool pawis=true,setws=true;
  rep(i,n){
    gcdd=gcd(gcdd,a[i]);
    if(pawis){
      if(a[i]==2 || a[i]==3){
	if(mp.count(a[i])){
	  pawis=false;
	}else{
	  mp[a[i]]++;
	}
      }
      for(int j=2;j*j<=a[i];j++){
	//cout<<a[i]<<endl;
	
	while(a[i]%j == 0){
	  //cout<<a[i]<<endl;
	  if(mp.count(j)){
	    pawis=false;
	    break;
	  }
	  a[i]/=j;
	  if(a[i]%j != 0){
	    mp[j]++;
	  }
	}
	
      }
    
      if(a[i]!=1){
	if(mp.count(a[i])){
	  pawis=false;
	}else{
	  mp[a[i]]++;
	}
      }
    }
    for(auto itr=mp.begin();itr!=mp.end();itr++){
      //  cout<<itr->F<<" ";
    }
    // cout<<endl;
  }
  if(pawis) cout<<"pairwise coprime"<<endl;
  else if(gcdd==1) cout<<"setwise coprime"<<endl;
  else cout<<"not coprime"<<endl;
	  

  return 0;
}
