#include <bits/stdc++.h>
using namespace std;

// #define int long long
#define rep(i, n) for (long long i = (long long)(0); i < (long long)(n); ++i)
#define reps(i, n) for (long long i = (long long)(1); i <= (long long)(n); ++i)
#define rrep(i, n) for (long long i = ((long long)(n)-1); i >= 0; i--)
#define rreps(i, n) for (long long i = ((long long)(n)); i > 0; i--)
#define irep(i, m, n) for (long long i = (long long)(m); i < (long long)(n); ++i)
#define ireps(i, m, n) for (long long i = (long long)(m); i <= (long long)(n); ++i)
#define SORT(v, n) sort(v, v + n);
#define REVERSE(v, n) reverse(v, v+n);
#define vsort(v) sort(v.begin(), v.end());
#define all(v) v.begin(), v.end()
#define mp(n, m) make_pair(n, m);
#define cout(d) cout<<d<<endl;
#define coutd(d) cout<<std::setprecision(10)<<d<<endl;
#define cinline(n) getline(cin,n);
#define replace_all(s, b, a) replace(s.begin(),s.end(), b, a);
#define PI (acos(-1))
#define FILL(v, n, x) fill(v, v + n, x);
#define sz(x) long long(x.size())

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vs = vector<string>;
using vpll = vector<pair<ll, ll>>;
using vtp = vector<tuple<ll,ll,ll>>;
using vb = vector<bool>;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

const ll INF = 1e9+10;
const ll MOD = 1e9+7;
const ll LINF = 1e18;

ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }

ll ngcd(vector<ll> a) {
  ll res = a[0];
  for(ll i=1; i<a.size() && res!=1; i++) res = gcd(a[i], res);
  return res;
}
ll nlcm(vector<ll> a){
  ll res = a[0];
  for(ll i=1; i<a.size(); i++) res = lcm(a[i], res);
  return res;
}
bool is_prime(ll n) {
  if(n < 2) return false;
  for (ll i = 2; i * i <= n; i++) if (n % i == 0) return false;
  return true;
}
ll digsum(ll n) {
  ll res=0;
  while(n) res += n%10, n /= 10;
  return res;
}
ll digcnt(ll n){
  ll res=0;
  while(n) res++, n /= 10;
  return res;
}
vector<ll> divisor(ll n) {
  vector<ll> res;
  for (ll i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      res.push_back(i);
      if (i != n / i) res.push_back(n / i);
    }
  }
  sort(res.begin(), res.end());
  return res;
}
map<ll, ll> prime_factor(ll n) {
  map<ll, ll> res;
  for (ll i = 2; i * i <= n; i++) {
    while (n % i == 0) ++res[i], n /= i;
  }
  if (n != 1) res[n] = 1;
  return res;
}

const ll maxn_eratosthenes = 1000005;
bool _is_prime[maxn_eratosthenes];
vector<ll> P;
ll D[1000005];

void eratosthenes(const ll N)
{
  P.clear();
  for (ll i = 0; i <= N; i++) {
    _is_prime[i] = true;
  }
  _is_prime[0]=_is_prime[1]=false;
  for (ll i = 2; i <= N; i++) {
    if (_is_prime[i]) {
      for (ll j = 2 * i; j <= N; j += i) {
        _is_prime[j] = false;
        if(D[j]==0) D[j]=i;
      }
      P.emplace_back(i);
      D[i]=i;
    }
  }
}

signed main()
{
  cin.tie( 0 ); ios::sync_with_stdio( false );
  
  ll n; cin>>n;
  vll a(n);
  ll maxn=0;
  rep(i,n) {
    cin>>a[i];
    chmax(maxn, a[i]);
  }
  auto b=a;
  eratosthenes(maxn);
  
  // rep(i,maxn+1){
  //   if(D[i]) cout<<i<<": "<<D[i]<<endl;
  // }
  
  bool x=true;
  set<ll> p;
  rep(i,n){
    set<ll> tmp;
    while(true){
      if(D[a[i]]==0) break;
      tmp.insert(D[a[i]]);
      a[i]/=D[a[i]];
    }
    for(auto e: tmp){
      if(p.count(e)){
        x=false;
        break;
      }
      p.insert(e);
    }
    if(!x) break;
  }
  // for(auto e: p) cout<<e<<' ';
  // cout<<endl;
  
  bool y=(ngcd(b)==1);
  
  
  if(x) cout<<"pairwise coprime"<<endl;
  else if(y) cout<<"setwise coprime"<<endl;
  else cout<<"not coprime"<<endl;
  
}

Measured memory_bytes: 36032