#include <bits/stdc++.h>
using namespace std;
template <typename A, typename B>
inline bool chmax(A &a, B b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename A, typename B>
inline bool chmin(A &a, B b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
using ll = long long;
using pii = pair<int, int>;
constexpr ll INF = 1ll << 30;
constexpr ll longINF = 1ll << 60;
constexpr ll MOD = 1000000007;
constexpr bool debug = 0;
using pll = pair<ll, ll>;
vector<pll> prime_factorization(ll n) {
  vector<pll> res;
  for (ll i = 2; i * i <= n; i++) {
    if (n % i == 0) res.emplace_back(i, 0);
    while (n % i == 0) {
      n /= i;
      res.back().second++;
    }
  }
  if (n > 1) res.emplace_back(n, 1);
  return res;
}
ll gcd(ll a, ll b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = (0); i < (N); ++i) scanf("%d", &A[i]);
  map<int, int> mm;
  for (int i = (0); i < (N); ++i) {
    auto pf = prime_factorization(A[i]);
    for (auto cur : pf) ++mm[cur.first];
  }
  bool pairwise = true;
  for (auto cur : mm) {
    if (cur.first == 1) continue;
    if (cur.second > 1) pairwise = false;
  }
  int g = A[0];
  for (int i = (1); i < (N); ++i) g = gcd(g, A[i]);
  if (pairwise)
    puts("pairwise coprime");
  else if (g == 1)
    puts("setwise coprime");
  else
    puts("not coprime");
  return 0;
}
