#include<bits/stdc++.h>
using namespace std;
int main(void){
  int m=0,n; cin>>n;
  vector<int> a(n);
  for(int i=0; i<n; ++i){ cin>>a[i]; m=max(m,a[i]);}
  vector<bool> p(m+1,true); p[0]=p[1]=false;
  vector<vector<int>> q(m+1,vector<int>(0));
  for(int i=2; i<=m; ++i)
    if(p[i]==true) for(int j=1; i*j<=m; ++j){ p[i*j]=false; q[i*j].push_back(i);}
  vector<int> r(m+1,0);
  for(int i=0; i<n; ++i) for(int j=0; j<q[a[i]].size(); ++j) ++r[q[a[i]][j]];
  int k=n,t=0;
  for(int i=1; i<=m; ++i)
    if(r[i]>0){ k=min(k,r[i]); t=max(t,r[i]);}
  if(t==1) cout<<"setwise coprime";
  else if(k==t) cout<<"pairwise coprime";
  else cout<<"not coprime";
  return 0;
}
