#include <bits/stdc++.h>
using namespace std;
int const MAXNUM = int(1e6);
void solve() {
  int n;
  cin >> n;
  vector<int> vis(MAXNUM + 1, false);
  vector<int> v(n);
  for (int i = 0; i < n; ++i) {
    cin >> v[i];
    if (v[i] == 1) {
      vis[1] += 1;
      continue;
    }
    int k = v[i];
    for (int j = 2; j * j <= k; j += 1) {
      bool used = false;
      while (k % j == 0) {
        used = true;
        k /= j;
      }
      if (used) vis[j] += 1;
    }
    if (k > 1) vis[k] += 1;
  }
  int maxVisited = 0;
  for (int i = 0; i < MAXNUM + 1; ++i) {
    if (vis[i]) {
      maxVisited = max(maxVisited, vis[i]);
    }
  }
  if (maxVisited == 1) {
    cout << "pairwise coprime" << '\n';
  } else if (maxVisited == n) {
    cout << "not coprime" << '\n';
  } else {
    cout << "setwise coprime" << '\n';
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int tcs;
  tcs = 1;
  while (tcs-- > 0) solve();
}
