#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
/* clang-format off */
#define MOD 1000000007
#define INF 1000000000
#define REP(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i)
#define ALL(a) (a).begin(), (a).end()
#define __DEBUG__
#ifdef __DEBUG__
#define CH_P(a) cout <<"check_point("<<#a<<")" << "\n";
#define DEBUG(x) cout<<#x<<":"<<x<<"\n"
#define DEBUGS(v) cout << #v << ":";for(auto x:v){cout<<x<<" ";}cout<<"\n"
#endif
#ifndef __DEBUG__
#define CH_P(a) 
#define DEBUG(x) 
#define DEBUGS(v) 
#endif
/* clang-format on */

void is_prime_cal(ll n, vector<bool> &is_prime) {
  // nまでの素数を生成
  // vector<bool> is_prime(n + 1, true);
  vector<bool> tmp(n + 1, true);
  is_prime = tmp;
  for (ll i = 0; i <= n; i++) {
    if (!is_prime.at(i)) continue;
    if (i == 0 || i == 1) is_prime.at(i) = false;
    if (is_prime.at(i)) {
      for (ll j = 2; j * i <= n; j++) {
        is_prime.at(j * i) = false;
      }
    }
  }
}

void prime_gen(ll n, vector<ll> &prime) {
  // nまでの素数を生成
  vector<bool> is_prime(n + 1, true);
  for (ll i = 0; i <= n; i++) {
    if (!is_prime.at(i)) continue;
    if (i == 0 || i == 1) is_prime.at(i) = false;
    if (is_prime.at(i)) {
      for (ll j = 2; j * i <= n; j++) {
        is_prime.at(j * i) = false;
      }
    }
  }
  REP(i, n + 1) {
    if (is_prime[i]) prime.push_back(i);
  }
}

void factorization(ll n, vector<bool> is_prime, set<ll> &f) {
  // 準備:is_prime_genでis_primeを生成しておく
  // factor[i].first = i番目の素数
  // factor[i].second = 指数
  vector<ll> prime;

  ll check_num = (ll)(sqrt(n));
  REP(i, check_num + 1) {
    if (is_prime.at(i)) prime.push_back(i);
  }
  for (auto &p : prime) {
    if (n % p == 0) f.insert(p);
    while (n % p == 0) n /= p;
    if (n == 1) break;
  }
  if (n != 1) {
    f.insert(n);
  }
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);

  ll n;
  cin >> n;
  vector<ll> a(n);
  REP(i, n) { cin >> a[i]; }

  ll g = a[0];
  REP(i, n) { g = gcd(g, a[i]); }
  if (g != 1) {
    cout << "not coprime" << endl;
    return 0;
  }

  set<ll> fac;
  vector<bool> is_prime;
  is_prime_cal(sqrt(*max_element(ALL(a))), is_prime);
  bool fp = true;
  REP(i, n) {
    set<ll> f;
    factorization(a[i], is_prime, f);
    for (auto x : f) {
      if (fac.count(x)) {
        fp = false;
        break;
      }
      fac.insert(x);
    }
    if (!fp) break;
  }

  if (fp)
    cout << "pairwise coprime" << endl;
  else
    cout << "setwise coprime\n";

  return 0;
}
