#include <bits/stdc++.h>
using namespace std;
int factorCount[100001];
bool primeSet[1001];
void make_prime() {
  primeSet[1] = false;
  for (int i = 2; i < 1001; i++) {
    primeSet[i] = true;
  }
  for (int i = 2; i < 1001; i++) {
    if (primeSet[i]) {
      for (int j = i + i; j < 1001; j += i) {
        primeSet[j] = false;
      }
    }
  }
}
void factorize(int in) {
  int x = in;
  for (int i = 2; i <= in && x != 1; i++) {
    if (primeSet[i] && !(x % i)) {
      while (!(x % i)) {
        x /= i;
      }
      factorCount[i]++;
    }
  }
  if (x != 1) {
    factorCount[x]++;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  make_prime();
  int max = -1;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    factorize(x);
    if (max < x) max = x;
  }
  bool isPairwise = true, isSetwise = true;
  for (int i = 2; i <= max; i++) {
    cout << factorCount[i] << ' ';
    if (factorCount[i] > 1) {
      isPairwise = false;
    }
    if (factorCount[i] == n) {
      isSetwise = false;
    }
  }
  if (isPairwise) {
    cout << "pairwise coprime\n";
    return 0;
  } else if (isSetwise) {
    cout << "setwise coprime\n";
    return 0;
  }
  cout << "not coprime\n";
  return 0;
}
