#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
class Prime {
  int M;
  vector<ll> D;

 public:
  Prime(int M) : M(M), D(M + 1) {
    for (int i = 2; i <= M; ++i) {
      if (D[i] > 0) continue;
      D[i] = i;
      for (ll j = i; i * j <= M; ++j) {
        D[i * j] = i;
      }
    }
  }
  vector<pair<ll, int>> fact(ll x) {
    assert(x > 0);
    if (x == 1) {
      return vector<pair<ll, int>>(1, {1, 0});
    }
    vector<pair<ll, int>> f;
    while (x > 1) {
      if (f.empty() || f.back().first != D[x]) {
        f.emplace_back(D[x], 1);
      } else {
        f.back().second++;
      }
      x /= D[x];
    }
    return f;
  }
};
class Main {
  int N;
  vector<int> A;
  ll gcd(ll a, ll b) { return a ? gcd(b % a, a) : b; }
  void input() {
    cin >> N;
    A.resize(N);
    for (int i = 0; i < N; ++i) {
      cin >> A[i];
    }
  }
  void output() {
    ll g = A[0];
    for (int i = 0; i < N - 1; ++i) {
      g = gcd(g, A[i + 1]);
    }
    if (g > 1) {
      cout << "not coprime" << endl;
      return;
    }
    set<ll> st;
    Prime prime(1000000);
    for (int i = 0; i < N; ++i) {
      auto f = prime.fact(A[i]);
      for (auto &p : f) {
        if (st.count(p.first)) {
          cout << "setwise coprime" << endl;
          return;
        }
        st.emplace(p.first);
      }
    }
    cout << "pairwise coprime" << endl;
  }

 public:
  Main() {
    input();
    output();
  }
};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  Main();
  return 0;
}
