#include <bits/stdc++.h>
using namespace std;
int N;
bool not_pairwise = false;
vector<int> A;
vector<bool> D;
bool input_init(void) {
  cin >> N;
  for (int i = 0; i < N; ++i) {
    int a;
    cin >> a;
    if (a != 1) A.push_back(a);
  }
  N = A.size();
  if (N <= 1) return false;
  return true;
}
void pre_check(void) {
  sort(A.begin(), A.end());
  A.erase(unique(A.begin(), A.end()), A.end());
  int sz = A.size();
  if (sz != N) not_pairwise = true;
  N = sz;
}
int solve(void) {
  int max_A = A[N - 1];
  bool f_pairwise = true;
  bool f_setwise = true;
  D.resize(max_A + 1, false);
  for (int i = 2; i <= max_A; ++i) {
    int p = 0;
    int cnt = 0;
    if (D[i]) continue;
    for (int j = i; j <= max_A; j += i) {
      D[j] = true;
      while (j > A[p]) ++p;
      if (j == A[p]) {
        ++p;
        ++cnt;
      }
    }
    if (cnt >= 2) f_pairwise = false;
    if (cnt == N) f_setwise = false;
  }
  int ret = 0;
  if (!not_pairwise && f_pairwise)
    ret = 1;
  else if ((not_pairwise || !f_pairwise) && f_setwise)
    ret = 2;
  return ret;
}
int main(void) {
  if (!input_init()) {
    cout << "pairwise coprime\n";
    return 0;
  }
  pre_check();
  int ans = solve();
  if (ans == 1)
    cout << "pairwise coprime\n";
  else if (ans == 2)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
  return 0;
}
