#include <bits/stdc++.h>
using namespace std;
int spf[1000001];
void sieve() {
  spf[1] = 1;
  for (int i = 2; i < 1000001; i++) spf[i] = i;
  for (int i = 4; i < 1000001; i += 2) spf[i] = 2;
  for (int i = 3; i * i < 1000001; i++) {
    if (spf[i] == i) {
      for (int j = i * i; j < 1000001; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
set<int> st[1000001];
void fact(int x, int i) {
  while (x != 1) {
    st[spf[x]].insert(i);
    x = x / spf[x];
  }
}
void test() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    fact(a[i], i);
  }
  bool ty1 = true, ty2 = true, ty3 = true;
  for (int i = 0; i < 1000001; i++) {
    if (st[i].size() > 1) ty1 = false;
    if (st[i].size() == n) ty2 = false;
  }
  if (ty1)
    cout << "pairwise coprime\n";
  else if (ty2)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
}
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  sieve();
  int tests = 1;
  while (tests--) {
    test();
  }
}
