#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
struct edge {
  ll to;
  ll cost;
};
using graph = vector<vector<edge>>;
const ll INF = 1e18;
inline void chmax(ll& a, ll b) { a = max(a, b); }
inline void chmin(ll& a, ll b) { a = min(a, b); }
double pi = acos(-1);
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; }
const int N = pow(10, 6) + 5;
vector<bool> isp(N + 1, true);
void sieve() {
  isp[0] = false;
  isp[1] = false;
  for (int i = 2; pow(i, 2) <= N; i++) {
    if (isp[i])
      for (int j = 2; i * j <= N; j++) isp[i * j] = false;
  }
}
int main() {
  ll n;
  cin >> n;
  vector<ll> A(n);
  for (ll i = 0; i < (n); ++i) cin >> A[i];
  ll ans = gcd(A[0], A[1]);
  for (ll i = 0; i < (n - 2); ++i) {
    ans = gcd(ans, A[i + 2]);
  }
  sieve();
  vector<ll> sosu;
  for (ll i = 1; i <= N - 5; i++) {
    if (isp[i]) sosu.push_back(i);
  }
  ll num = sosu.size();
  vector<bool> han(num);
  for (ll i = 0; i < (num); ++i) han[i] = 1;
  if (ans != 1)
    cout << "not coprime" << endl;
  else {
    bool ok = 0;
    bool ko = 0;
    for (ll i = 0; i < (n); ++i) {
      if (ko) break;
      ll now = A[i];
      for (ll j = 0; j < (num); ++j) {
        if (now == 1) break;
        if (han[j] == 1 && now % sosu[j] == 0) {
          han[j] = 0;
          while (now % sosu[j] == 0) {
            now /= sosu[j];
          }
        }
        if (han[j] == 0 && now % sosu[j] == 0) {
          ok = 1;
          ko = 1;
        }
      }
    }
    if (ok)
      cout << "setwise coprime" << endl;
    else
      cout << "pairwise coprime" << endl;
  }
  return 0;
}
