#include <bits/stdc++.h>
using namespace std;
void myInit();
int mpow(int base, int exp);
void ipgraph(int m);
void dfs(int u, int par);
const int MOD = 1000000007;
const int N = 3e5, M = N;
vector<int> g[N];
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; }
int main() {
  myInit();
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int i, n;
  cin >> n;
  vector<int> a(n);
  long long prod = 1, lastGCD;
  bool pairwise = true, setwise = true;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (i > 0) {
      if (lcm(a[i], prod) % prod != 0 || a[i] != (lcm(a[i], prod) / prod)) {
        pairwise = false;
      }
      lastGCD = gcd(lastGCD, a[i]);
    } else
      lastGCD = a[0];
    prod *= a[i];
  }
  if (lastGCD != 1) setwise = false;
  if (pairwise)
    cout << "pairwise coprime\n";
  else if (setwise)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
  return 0;
}
void myInit() {}
int mpow(int base, int exp) {
  base %= MOD;
  int result = 1;
  while (exp > 0) {
    if (exp & 1) result = ((long long)result * base) % MOD;
    base = ((long long)base * base) % MOD;
    exp >>= 1;
  }
  return result;
}
void ipgraph(int n, int m) {
  int i, u, v;
  while (m--) {
    cin >> u >> v;
    g[u - 1].push_back(v - 1);
    g[v - 1].push_back(u - 1);
  }
}
void dfs(int u, int par) {
  for (int v : g[u]) {
    if (v == par) continue;
    dfs(v, u);
  }
}
