#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,avx2,fma,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
using namespace std;
#define boost ios_base::sync_with_stdio(0),cin.tie(0), cout.tie(0)
typedef long long ll;


ll mod = 1e9 + 7;
ll power(ll x, ll n, ll mod) {
  ll res = 1;
  x %= mod;
  while (n) {
    if (n & 1)
      res = (res * x) % mod;
    x = (x * x) % mod;
    n >>= 1;
  }
  return res;
}

//#######################################


int main(){
  boost;
  ll n;
  cin>>n;
  ll a[n];
  ll count[1000006]={};
  for(int i=0;i<n;i++){
    cin>>a[i];
    for(ll j=1;j<=sqrt(a[i]);j++){
      if(a[i]%j==0){
        count[j]++;
        if(j!=a[i]/j){
          count[a[i]/j]++;
        }
      }
    }
  }
  bool flag=true;
  for(ll i=1000001;i>1;i--){
    if(count[i]>1){
      flag=false;
      break;
    }
  }
  ll check1=a[0];
  for(int i=1;i<n;i++){
    check1=__gcd(check1,a[i]);
  }


  if(flag){
    cout<<"pairwise coprime";
  }
  else if(check1==1){
    cout<<"setwise coprime";
  }
  else{
    cout<<"not coprime";
  }


}

