#include <bits/stdc++.h>
using namespace std;
void sieve(vector<bool>& isprime) {
  int i, j, k;
  for (i = 2; i <= sqrt(1000000); i++) {
    if (!isprime[i]) {
      for (j = 2 * i; j <= 1000000; j += i) {
        isprime[j] = 1;
      }
    }
  }
}
void test(int r) {
  vector<bool> pr(1e6 + 1, 0);
  sieve(pr);
  vector<int> pi;
  int n;
  cin >> n;
  vector<int> v(n);
  int i;
  for (i = 0; i < n; i++) cin >> v[i];
  for (i = 2; i <= 1e6; i++) {
    if (!pr[i]) {
      pi.push_back(i);
    }
  }
  vector<int> pc(1e6 + 1, 0);
  for (i = 0; i < n; i++) {
    vector<int> pp;
    int j;
    int x = v[i];
    for (j = 0; pi[j] <= x; j++) {
      if (x % pi[j] == 0) {
        pp.push_back(pi[j]);
        while (x % pi[j] == 0) {
          x = x / pi[j];
        }
      }
    }
    if (x != 1) pp.push_back(x);
    for (auto it : pp) pc[it]++;
  }
  int f = 0;
  for (i = 2; i <= 1e6; i++) {
    f = max(f, pc[i]);
  }
  if (f == 1) {
    cout << "pairwise coprime";
  } else if (f != n) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1, r;
  for (r = 1; r <= t; r++) test(r);
  return 0;
}
