#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);
    }
  }
  int ichi = 0;
  map<llong, llong> m;
  for (auto &a : A) {
    ichi += a == 1;
    for (auto &p : prime) {
      if (a % p == 0) {
        m[p]++;
        while (a % p == 0) {
          a /= p;
        }
      }
    }
  }
  if (ichi) {
    bool all_one = true;
    for (auto it : m) {
      all_one &= it.second == 1;
    }
    if (ichi >= N - 1 || all_one) {
      cout << "pairwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  } else {
    bool all_one = true;
    bool all = false;
    for (auto it : m) {
      all_one &= it.second == 1;
      all |= it.second == N;
    }
    if (all_one) {
      cout << "pairwise coprime" << endl;
    } else if (all) {
      cout << "not coprime" << endl;
    } else {
      cout << "setwise coprime" << endl;
    }
  }
  return 0;
}
