#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
using ull = uint64_t;
const ll INF = 9e18;
void print() { cout << endl; }
template <typename Head, typename... Tail>
void print(Head head, Tail... tail) {
  int size = sizeof...(Tail);
  cout << head;
  if (size > 0) {
    cout << " ";
  }
  print(tail...);
}
void print0() {}
template <typename Head, typename... Tail>
void print0(Head head, Tail... tail) {
  cout << head;
  print0(tail...);
}
vector<ll> mkprimes(ll N) {
  vector<bool> isprime(N + 1);
  vector<ll> primes;
  for (ll i = 0; i <= N; i++) {
    isprime[i] = true;
  }
  isprime[0] = false;
  isprime[1] = false;
  for (ll i = 2; i <= N; i++) {
    if (isprime[i]) {
      primes.push_back(i);
      for (ll j = 2 * i; j <= N; j += i) {
        isprime[j] = false;
      }
    }
  }
  return primes;
}
const ll NMAX = 1000000;
vector<vector<ll>> prime_factors(ll m) {
  vector<vector<ll>> result(m + 1);
  vector<ll> primes = mkprimes(m);
  vector<bool> isprime(m + 1, false);
  for (auto p : primes) {
    isprime[p] = true;
  }
  for (ll nn = 2; nn <= m; nn++) {
    if (isprime[nn]) {
      result[nn].push_back(nn);
      continue;
    }
    ll n = nn;
    for (auto p : primes) {
      if (n % p == 0) {
        bool exist = false;
        for (ll pp : result[n / p]) {
          if (pp == p) {
            exist = true;
          }
          result[n].push_back(pp);
        }
        if (!exist) {
          result[n].push_back(p);
        }
        break;
      }
    }
  }
  return result;
}
int main() {
  ll N;
  cin >> N;
  vector<ll> A(N);
  for (ll i = 0; i < N; i++) {
    cin >> A[i];
  }
  ll maxval = 1000000;
  vector<vector<ll>> prime_factors(maxval);
  {
    bool pc = true;
    vector<bool> used(maxval + 1, false);
    for (ll i = 0; i < N; i++) {
      ll n = A[i];
      for (auto pf : prime_factors[n]) {
        if (used[pf]) {
          pc = false;
          break;
        }
        used[pf] = true;
      }
      if (!pc) {
        break;
      }
    }
    if (pc) {
      print("pairwise coprime");
      return 0;
    }
  }
  {
    vector<ll> usecount(maxval + 1, 0);
    for (ll i = 0; i < N; i++) {
      ll n = A[i];
      for (auto pf : prime_factors[n]) {
        usecount[pf]++;
      }
    }
    ll maxusecount = 0;
    for (auto u : usecount) {
      maxusecount = max(maxusecount, u);
    }
    if (maxusecount == N) {
      print("setwise coprime");
      return 0;
    } else {
      print("not coprime");
      return 0;
    }
  }
}
