#include <bits/stdc++.h>
using namespace std;
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];
int a[N];
void solve() {
  int i, j, k, p, q, r, x, y, u, v, n, m = 0, c = 0, pair = 1, set = 1;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    m = max(a[i], m);
  }
  for (i = 2; i <= sqrt(m); i++) {
    c = 0;
    for (j = 0; j < n; j++) {
      if (a[j] % i == 0) {
        c++;
      }
    }
    if (c > 1) {
      pair = 0;
    }
    if (c == n) {
      set = 0;
    }
  }
  if (pair) {
    cout << "pairwise coprime" << endl;
    return;
  }
  if (set) {
    cout << "setwise coprime" << endl;
    return;
  }
  cout << "not coprime" << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  int i, t = 1;
  for (i = 1; i <= t; i++) {
    solve();
  }
  return 0;
}
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);
  }
}
