#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <unordered_set>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;

vector<bool> prime_table(int n) {
  vector<bool> prime(n + 1, true);
  if (n >= 0) prime[0] = false;
  if (n >= 1) prime[1] = false;
  for (int i = 2; i * i <= n; i++) {
    if (!prime[i]) continue;
    for (int j = i + i; j <= n; j += i) {
      prime[j] = false;
    }
  }
  return prime;
}

map<int64_t, int> prime_factor(int64_t n) {
  map<int64_t, int> ret;
  for (int64_t i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      ret[i]++;
      n /= i;
    }
  }
  if (n != 1) ret[n] = 1;
  return ret;
}

int main(void) {
  ios::sync_with_stdio(false);
  vector<bool> ptbl = prime_table(1e6 + 1);
  int N;
  cin >> N;
  vector<int64_t> A(N);
  vector<int64_t> B;
  unordered_set<int64_t> hist;
  rep(i, N) {
    cin >> A[i];
    if (!ptbl[A[i]]) {
      B.emplace_back(A[i]);
    } else {
      hist.emplace(A[i]);
    }
  }

  int BN = B.size();
  if (BN == 0) {
    cout << "pairwise coprime" << endl;
    return 0;
  } else if (2 <= BN) {
    int64_t Bgcd = B[0];
    for (int i = 1; i < BN; ++i) {
      Bgcd = gcd(Bgcd, B[i]);
    }
    if (Bgcd != 1) {
      cout << "not coprime" << endl;
      return 0;
    }
  }

  rep(i, BN) {
    cout << i << ": " << B[i] << endl;
    for (auto& d : prime_factor(B[i])) {
      if (hist.count(d.first)) {
        cout << "setwise coprime" << endl;
        return 0;
      }
      hist.emplace(d.first);
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
