#include <bits/stdc++.h>
 
using namespace std;
 
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef pair<ll,ll> P;
typedef string str;
typedef vector<P> vp;
typedef vector<string> vs;
typedef vector<bool> vb;

const ll mod=1e9+7;
const ll inf=1e16;

#define rep(i,m,n) for(ll i=m;i<n;i++)
#define repr(i,m,n) for(ll i=m-1;i>=n;i--)
#define fi first
#define se second
#define chmax(x,y) x=max(x,y)
#define chmin(x,y) x=min(x,y)
#define eb(x) emplace_back(x)
#define pb(x) pop_back(x)
#define all(x) x.begin(),x.end()
#define allr(x) x.rbegin(),x.rend()
#define sum(x) accumulate(all(x),0)
#define pc(x) __builtin_popcount(x)
#define gll greater<ll>()





void solve(){
 ll n;
  cin >> n;
  vll a(n);
  rep(i,0,n) cin >> a[i];
  
  ll g=a[0];
  rep(i,1,n) g=__gcd(a[i],g);
  
  map<ll,vll> mp;
  ll f=0;
  rep(j,0,n){
    for(ll i=2;i*i<=a[j];i++){
     if(a[j]%i) continue;
      ll tot=0;
     while(a[j]%i==0){ 
      a[j]/=i;
      tot++; 
     }
      mp[i].eb(tot);
    }
    if(a[j]!=1) mp[a[j]].eb(1);
  }
  
  for(auto p:mp) if(p.se.size()>1) f=1;
  
  
  if(f==0) cout << "pairwise coprime" << endl;
  else if(f==1&&g==1) cout << "setwise coprime" << endl;
  else cout << "not coprime" << endl;
  
  
  
}
int main(){
   cin.tie(nullptr);
  ios::sync_with_stdio(false);
  solve();
}
