#include <bits/stdc++.h>
using namespace std;
int gcd(int s, int k) {
  if (k == 0)
    return s;
  else
    return gcd(k, s % k);
}
vector<int> primes;
void isPrime(int n) {
  vector<bool> p;
  for (int i = 0; i <= n; i++) p.push_back(true);
  p[0] = 0;
  p[1] = 0;
  for (int i = 2; i <= n; i++) {
    if (p[i]) {
      primes.push_back(i);
      for (int j = 2 * i; j * j <= n; j += i) p[j] = 0;
    }
  }
}
int main() {
  int n, g, e = 0;
  cin >> n;
  int a[n], mx = INT_MIN, p[1000000] = {0};
  cin >> a[0];
  g = a[0];
  for (int i = 1; i < n; i++) {
    cin >> a[i], mx = max(mx, a[i]), g = gcd(g, a[i]);
    if (!a[i] % 2) e++;
    if (binary_search(primes.begin(), primes.end(), a[i])) p[i] = 1;
  }
  if (g == 1)
    cout << "pairwise coprime" << endl;
  else {
    bool b = true;
    vector<int> v[mx + 1];
    for (int i = 0; i < n; i++) {
      if (a[i] % 2 == 0)
        v[0].push_back(a[i]);
      else if (p[i])
        v[a[i]].push_back(a[i]);
      else {
        for (int j = 3; j * j <= mx; j++) {
          if (a[i] % j) {
            v[j].push_back(a[i]);
            b = false;
            break;
          }
        }
        if (!b) break;
      }
      if (!b)
        cout << "not coprime" << endl;
      else
        cout << "setwise coprime" << endl;
    }
  }
  return 0;
}
