#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fLL;
const int MAX = 1e6 + 10;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int N;
  cin >> N;
  vector<int> V(N);
  for (int i = 0; i < N; i++) cin >> V[i];
  vector<unordered_set<int>> Div(N);
  bitset<MAX> BB;
  for (int i = 0; i < N; i++) {
    while (!(V[i] & 1)) {
      Div[i].insert(2);
      BB[2] = 1;
      V[i] /= 2;
    }
    for (long long j = 3; j * j <= (long long)V[i]; j += 2) {
      while (!(V[i] % j)) {
        Div[i].insert(j);
        BB[j] = 1;
        V[i] /= j;
      }
    }
    if (V[i] > 1) {
      Div[i].insert(V[i]);
      BB[V[i]] = 1;
    }
  }
  bool ok = 1;
  for (int i = 1; i < MAX; i++) {
    if (!BB[i]) continue;
    bool all = 1;
    for (int j = 0; j < N; j++) all &= (Div[j].count(i));
    ok &= (!all);
  }
  if (!ok) {
    cout << "not coprime\n";
    return 0;
  }
  bool pc = 1;
  for (int i = 0; i < N; i++) {
    for (auto x : Div[i]) {
      pc &= BB[x];
      BB[x] = 0;
    }
  }
  cout << (pc ? "pairwise coprime" : "setwise coprime") << '\n';
  return 0;
}
