// -----------------------------------
// author   : MatsuTaku
// country  : Japan
// created  : 08/29/20 20:54:54
// -----------------------------------

#include <bits/stdc++.h>

using namespace std;
using ll = long long;
constexpr int MAX = 1e6;

int main() {
  cin.tie(nullptr); ios::sync_with_stdio(false);

  vector<vector<int>> elas(MAX+1);
  for (int k = 2; k <= MAX; k++) {
    if (!elas[k].empty()) continue;
    for (int j = k*2; j <= MAX; j += k) {
      elas[j].push_back(k);
    }
  }
  int n; cin>>n;
  vector<int> A(n); for (auto& a:A) cin>>a;
  int gcd_a = A[n-1];
  unordered_set<int> inv;
  for (auto k:elas[A[n-1]]) {
    inv.insert(k);
  }
  int type = 0;
  for (int i = n-2; i >= 0; i--) {
    bool ok = true;
    for (auto k:elas[A[i]]) {
      if (inv.count(k) > 0) {
        ok = false;
        break;
      }
    }
    for (auto k:elas[A[i]]) {
      inv.insert(k);
    }
    if (!ok) {
      type = 1;
    }
    gcd_a = gcd(gcd_a, A[i]);
  }
  switch (type) {
    case 0:
      cout << "pairwise coprime" << endl;
      break;
    case 1:
      if (gcd_a == 1)
        cout << "setwise coprime" << endl;
      else
        cout << "not coprime" << endl;
      break;
    default:
      break;
  }

  return 0;
}
