#include <bits/stdc++.h>
using namespace std;
inline int D() {
  int t;
  scanf("%d", &t);
  return t;
}
inline long long llD() {
  long long t;
  scanf("%lld", &t);
  return t;
}
long long mod = 1e9 + 7;
const int OO = -1e6;
int xt[4] = {1, 0, 0, -1};
int yt[4] = {0, 1, -1, 0};
const int N = 1e6 + 1;
int greatestPF[N];
vector<int> prime;
void sieve() {
  bitset<N> iscomp;
  iscomp[0] = iscomp[1] = 1;
  for (long long i = 2; i <= N; ++i) {
    if (!iscomp[i]) {
      prime.push_back(i);
      for (long long j = i * i; j <= N; j += i) iscomp[j] = 1;
    }
  }
}
long long mem[100005][3], a[200005], b[105], n, m, k, frq[200005];
bool valid(int x, int y) { return x > -1 && y > -1 && x < n && y < m; }
void init() { memset(mem, -1, sizeof mem); }
int main() {
  sieve();
  init();
  int T = 1;
  while (T-- > 0) {
    bool B = 1;
    cin >> n;
    int ans = 0;
    long long m = 0;
    for (long long i = 0; i < n; i++) {
      cin >> a[i];
      if (binary_search(prime.begin(), prime.end(), a[i])) {
        frq[a[i]]++;
        m = max(frq[a[i]], m);
      } else {
        for (int j = 0; a[i] != 1; j++) {
          if (a[i] % frq[prime[j]] == 0) {
            frq[prime[j]]++;
            m = max(frq[prime[j]], m);
            while (a[i] % frq[prime[j]] == 0) a[i] / prime[j];
          }
        }
      }
      if (m == 1)
        cout << "pairwise coprime\n";
      else if (m == n)
        cout << "not coprime\n";
      else
        cout << "setwise coprime\n";
    }
  }
}
