#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vec = vector<ll>;
using mat = vector<vec>;
using pll = pair<ll, ll>;
ll gcd(ll a, ll b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  ll N;
  cin >> N;
  vec A(N);
  for (ll(i) = (0), (i_len) = (N); (i) < (i_len); ++(i)) cin >> A[i];
  sort(((A)).begin(), ((A)).end());
  ll setG = A[0];
  for (ll(i) = (1), (i_len) = (N); (i) < (i_len); ++(i)) setG = gcd(A[i], setG);
  vec P(A[N - 1] + 1, 1);
  map<ll, vec> Q;
  for (ll i = 2; i * i <= A[N - 1]; ++i) {
    if (P[i] == 1) {
      for (ll j = 2; i * j <= A[N - 1]; ++j) {
        if (P[i * j] == 1)
          P[i * j] = i;
        else
          P[i * j] = (((i) < (P[i * j])) ? (i) : (P[i * j]));
        if (find((A).begin(), (A).end(), i * j) != A.end())
          Q[i * j].push_back(P[i * j]);
      }
    }
  }
  bool f = true;
  map<ll, ll> R;
  for (auto(q) : Q) {
    for (auto(v) : q.second) ++R[v];
  }
  for (auto(r) : R) {
    if (r.first > 1 && r.second > 1) {
      f = false;
      break;
    }
  }
  if (f)
    cout << ("pairwise coprime") << endl;
  else {
    if (setG == 1)
      cout << ("setwise coprime") << endl;
    else
      cout << ("not coprime") << endl;
  }
  return 0;
}
