#include <bits/stdc++.h>
using namespace std;
int INF = 1e9 + 7;
int mod = 998244353;
long double PI =
    3.141592653589793238462643383279502884197169399375105820974944592307816406286208998626034825342117;
struct Edge {
  long long to;
  long long cost;
};
void dijkstra(const vector<vector<Edge>>& G, long long s,
              vector<long long>& dis) {
  long long N = G.size();
  dis.resize(N, INF);
  priority_queue<pair<int, int>, vector<pair<int, int>>,
                 greater<pair<int, int>>>
      pq;
  dis[s] = 0;
  pq.emplace(dis[s], s);
  while (!pq.empty()) {
    pair<int, int> p = pq.top();
    pq.pop();
    int v = p.second;
    if (dis[v] < p.first) {
      continue;
    }
    for (auto& e : G[v]) {
      if (dis[e.to] > dis[v] + e.cost) {
        dis[e.to] = dis[v] + e.cost;
        pq.emplace(dis[e.to], e.to);
      }
    }
  }
  return;
}
long double kodohou(long double N) { return N * 180.0 / PI; }
struct UnionFind {
  vector<int> par;
  UnionFind(int N) : par(N) {
    for (int i = 0; i < N; i++) par[i] = i;
  }
  int root(int x) {
    if (par[x] == x) return x;
    return par[x] = root(par[x]);
  }
  void unite(int x, int y) {
    int rx = root(x);
    int ry = root(y);
    if (rx == ry) return;
    par[rx] = ry;
  }
  bool same(int x, int y) {
    int rx = root(x);
    int ry = root(y);
    return rx == ry;
  }
};
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
long long modinv(long long a, long long m) {
  long long b = m, u = 1, v = 0;
  while (b) {
    long long t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  u %= m;
  if (u < 0) u += m;
  return u;
}
bool IsPrime(int num) {
  if (num < 2)
    return false;
  else if (num == 2)
    return true;
  else if (num % 2 == 0)
    return false;
  double sqrtNum = sqrt(num);
  for (int i = 3; i <= sqrtNum; i += 2) {
    if (num % i == 0) {
      return false;
    }
  }
  return true;
}
signed gcd(long long x, long long y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
signed lcm(long long x, long long y) { return x / gcd(x, y) * y; }
long long RepeatSquaring(long long N, long long P, long long M) {
  if (P == 0) return 1;
  if (P % 2 == 0) {
    long long t = RepeatSquaring(N, P / 2, M);
    return t * t % M;
  }
  return N * RepeatSquaring(N, P - 1, M);
}
long long Fibonacci(long long A) {
  if (A == 1) return 1;
  vector<long long> B(A + 1);
  B[0] = 1;
  B[1] = 1;
  for (int i = 2; i <= A; i++) {
    B[i] = B[i - 1] + B[i - 2];
    B[i] %= mod;
  }
  return B[A];
}
int mod_pow(int x, int y) {
  int res = 1;
  while (y > 0) {
    if (y % 2) {
      res = res * x % mod;
    }
    x = x * x % mod;
    y /= 2;
  }
  return res;
}
int fac[100005], finv[100005], inv[100005];
void COMinit() {
  fac[0] = fac[1] = 1;
  finv[0] = finv[1] = 1;
  inv[1] = 1;
  for (int i = 2; i < 100005; i++) {
    fac[i] = fac[i - 1] * i % mod;
    inv[i] = mod - inv[mod % i] * (mod / i) % mod;
    finv[i] = finv[i - 1] * inv[i] % mod;
  }
}
int COM(int n, int k) {
  if (n < k) return 0;
  if (n < 0 || k < 0) return 0;
  return fac[n] * (finv[k] * finv[n - k] % mod) % mod;
}
vector<int> sieve(int max) {
  vector<bool> prime(max + 1, true);
  vector<int> A;
  for (int i = 2; i <= max; ++i)
    if (prime[i]) {
      A.push_back(i);
      for (int j = 2; i * j <= max; ++j) prime[i * j] = false;
    }
  return A;
}
map<int, int> prime_factorize(vector<int>& prime, map<int, int>& B,
                              long long N) {
  for (int a : prime) {
    if (N % a != 0) continue;
    while (N % a == 0) N /= a;
    B[a]++;
  }
  return B;
}
signed main() {
  vector<int> prime = sieve(1000000);
  int N;
  cin >> N;
  vector<int> A(N);
  int count = 0;
  map<int, int> B;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    if (i == 0) count = A[i];
    count = gcd(count, A[i]);
    B = prime_factorize(prime, B, A[i]);
  }
  if (count != 1) {
    puts("not coprime");
    return 0;
  }
  for (int i : prime) {
    if (B[i] > 1) {
      puts("setwise coprime");
      return 0;
    }
  }
  puts("pairwise coprime");
}
