#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  unordered_map<int, vector<int>> memo;
  int a;
  for (int i = 0; i < N; i++) {
    a = A[i];
    for (int x = 2; x * x <= a; x++) {
      if (a % x != 0) continue;
      int ex = 0;
      while (a % x == 0) {
        ex++;
        a /= x;
      }
      if (!memo.count(x))
        for (int k = 0; k < N; k++) memo[x].push_back(0);
      memo[x][i] = ex;
    }
  }
  bool flagNotCoprime = false;
  bool flagCannotBePairwise = false;
  for (auto p : memo) {
    int numNoneZero = 0;
    for (int x : p.second) {
      if (x != 0) numNoneZero++;
    }
    if (numNoneZero == N) flagNotCoprime = true;
    if (numNoneZero >= 2) flagCannotBePairwise = true;
  }
  if (!flagCannotBePairwise)
    cout << "pairwise coprime" << endl;
  else if (!flagNotCoprime)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
