#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define INF (int)1e9+4
#define INFL (ll)1e18+4
#define md (int)1e9+7
#define mx 10000000  //use fixed<<setprecion
#define mk make_pair
#define pi pair<int,int>
#define ss second
#define ff first
#define pb emplace_back
#define onell(x) __builtin_popcountll(x)
#define one(x) __builtin_popcount(x)
#define maxi(a) *max_element(a.begin(),a.end());
#define mini(a) *min_element(a.begin(),a.end());
#define all(s) s.begin(),s.end()
#define rall(x) (x).rbegin(), (x).rend()
#define trav(x, a) for (auto& x: a)
#define fr(i,a,b) for(int i=a;i<=b;i++)
#define rep(i,a,b) for(int i=a;i<b;i++)
#define per(i,a,b) for(int i=a;i>b;i--)
#define rf(i,a,b) for(int i=a;i>=b;i--)
#define sz(x) ((long long)x.size())
#define mez(s) memset(s,0,sizeof s)
#define mex(s) memset(s,-1,sizeof s)
#define metr(s) memset(s,true, sizeof s)
typedef vector<int> vi;
typedef vector<ll>vl;
typedef map<int,int> mp;
typedef queue<int> que;
typedef vector<pi> vp;
const int mxn=1e6+6;bool vis[mxn];
void sieve(){
	metr(vis);
	for(int i=2;i*i<=mxn;i++){
		if(vis[i])
		for(int j=i*i;j<=mxn;j+=i){
			vis[j]=false;
		}
	}
}
void solve(){
int n=0,x=0,y=0,z=0,m=0,k=0;ll ans=0;
sieve();cin>>n;
vi a(n);rep(i,0,n)cin>>a[i];
x=maxi(a);bool c=1;
for(int i=2;i*i<=x;i++){
	int d=0;
	if(vis[i]){
	rep(j,0,n){
	    if(a[j]%i==0){
	    	d++;
		}	
	}
	if(d>=2){
		c=0;
		break;
	}
}
}
if(c){
	cout<<"pairwise coprime";return;
}
rep(i,0,n){
	y=__gcd(y,a[i]);
}
if(y==1){
cout<<"setwise coprime";	
}
else{
	cout<<"not coprime";
}
}
int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t=1;
  //cin>>t;
  while(t--){
  	solve();
  }
  return 0;
}
