#include <bits/stdc++.h>
using namespace std;
using llong = long long;
using ldbl = long double;
using lpair = pair<llong, llong>;
constexpr llong mod = 1e9 + 7;
constexpr llong inf = mod * mod;
int main() {
  llong N;
  vector<llong> A;
  cin >> N;
  A.resize(N);
  for (auto &in : A) {
    cin >> in;
  }
  sort(A.begin(), A.end());
  vector<llong> prime;
  for (int i = 2; i <= 1000; i++) {
    bool ok = true;
    for (auto &p : prime) {
      if (i % p == 0) {
        ok = false;
        break;
      }
    }
    if (ok) {
      prime.push_back(i);
    }
  }
  map<llong, llong> m;
  for (auto &a : A) {
    for (auto &p : prime) {
      if (a % p == 0) {
        m[p]++;
        while (a % p == 0) {
          a /= p;
        }
      }
    }
  }
  bool all_one = true;
  bool all = false;
  for (auto it : m) {
    all_one &= it.second == 1;
    all |= it.second == N;
  }
  if (all_one) {
    return 1;
    cout << "pairwise coprime" << endl;
  } else if (all) {
    cout << "not coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
