#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
using ll = long long;
using pint = pair<int, int>;
using pll = pair<ll, ll>;
using Graph = vector<vector<int>>;
long long GCD(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return GCD(b, a % b);
}
struct Eratos {
  vector<int> primes;
  vector<bool> isprime;
  vector<int> min_factor;
  Eratos(int MAX) : primes(), isprime(MAX + 1, true), min_factor(MAX + 1, -1) {
    isprime[0] = isprime[1] = false;
    min_factor[0] = 0, min_factor[1] = 1;
    for (int i = 2; i <= MAX; ++i) {
      if (!isprime[i]) continue;
      primes.push_back(i);
      min_factor[i] = i;
      for (int j = i * 2; j <= MAX; j += i) {
        isprime[j] = false;
        if (min_factor[j] == -1) min_factor[j] = i;
      }
    }
  }
  vector<pair<int, int>> prime_factorize(int n) {
    vector<pair<int, int>> res;
    while (n != 1) {
      int prime = min_factor[n];
      int exp = 0;
      while (min_factor[n] == prime) {
        ++exp;
        n /= prime;
      }
      res.push_back(make_pair(prime, exp));
    }
    return res;
  }
};
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (ll i = 0; i < (ll)(N); i++) cin >> A[i];
  Eratos er(1100000);
  map<int, int> M;
  int flag = 0;
  for (ll i = 0; i < (ll)(N); i++) {
    auto pf = er.prime_factorize(A[i]);
    for (auto p : pf) {
      if (i == 0) {
        M[p.first]++;
      } else {
        if (M.count(p.first)) {
          flag = 1;
          break;
        }
      }
    }
    if (flag) break;
  }
  if (!flag) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  ll res = A[0];
  for (ll i = 1; i <= (ll)(N - 1); i++) res = GCD(res, A[i]);
  if (res == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
