#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long num = 0, neg = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') neg = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    num = (num << 3) + (num << 1) + c - '0';
    c = getchar();
  }
  return num * neg;
}
int prime[1000010], mi[1000010], a[1000010], cnt[1000010], g;
bool umprime[1000010];
inline void Eular(int n) {
  for (int i = 2; i <= n; i++) {
    if (!umprime[i]) prime[++prime[0]] = i, mi[i] = i;
    for (int j = 1; j <= prime[0] && i * prime[j] <= n; j++) {
      umprime[i * prime[j]] = 1, mi[i * prime[j]] = min(mi[i], prime[j]);
      if (i % prime[j] == 0) break;
    }
  }
  return;
}
inline void solve(int x) {
  while (x > 1) {
    int tmp = mi[x];
    while (x % tmp == 0) x /= tmp;
    cnt[tmp]++;
  }
  return;
}
inline int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }
int main() {
  Eular(1000000);
  int n = read();
  bool ispair = 1;
  g = a[1] = read(), solve(a[1]);
  for (int i = 2; i <= n; i++) a[i] = read(), solve(a[i]), g = gcd(g, a[i]);
  for (int i = 1; i <= 1000000; i++) ispair &= (cnt[i] <= 1);
  for (int i = 1; i <= 1000000; i++) cout << cnt[i] << " ";
  if (ispair)
    printf("pairwise coprime\n");
  else if (g == 1)
    printf("setwise coprime\n");
  else
    printf("not coprime\n");
  return 0;
}
