#include <bits/stdc++.h>
using namespace std;
struct UnionFind {
  vector<int> par;
  UnionFind(int n) : par(n, -1) {}
  void init(int n) { par.assign(n, -1); }
  int root(int x) {
    if (par[x] < 0)
      return x;
    else
      return par[x] = root(par[x]);
  }
  bool issame(int x, int y) { return root(x) == root(y); }
  bool merge(int x, int y) {
    x = root(x);
    y = root(y);
    if (x == y) return false;
    if (par[x] > par[y]) swap(x, y);
    par[x] += par[y];
    par[y] = x;
    return true;
  }
  int size(int x) { return -par[root(x)]; }
};
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
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;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int(i) = 0; (i) < (n); ++(i)) cin >> a[i];
  vector<int> p(1001001);
  p[0] = p[1] = 0;
  for (int i = 2; i <= 1000000; ++i) {
    if (p[i]) continue;
    for (int j = i; j <= 1000000; j += i) p[j] = i;
  }
  vector<bool> used(1001001);
  bool pairwise = true;
  for (int(i) = 0; (i) < (n); ++(i)) {
    int now = a[i];
    while (now > 1) {
      if (used[now]) pairwise = false;
      used[now] = true;
      int d = p[now];
      while (p[now] == d) {
        now /= d;
      }
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int g = 0;
  for (int(i) = 0; (i) < (n); ++(i)) g = gcd(a[i], g);
  if (g == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
