#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
int spf[1000001];
long long int primesused[1000001];
long long int maxnow;
void sieve() {
  spf[1] = 1;
  for (int i = 2; i < 1000001; i++) spf[i] = i;
  for (int i = 4; i < 1000001; i += 2) spf[i] = 2;
  for (int i = 3; i * i < 1000001; i++) {
    if (spf[i] == i) {
      for (int j = i * i; j < 1000001; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
set<int> getFactorization(int x) {
  set<int> k;
  while (x != 1) {
    k.insert(spf[x]);
    x = x / spf[x];
  }
  return k;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  sieve();
  long long int n;
  cin >> n;
  vector<long long int> a(n);
  maxnow = -1;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    set<int> now;
    now = getFactorization(a[i]);
    for (auto i : now) primesused[i]++, maxnow = max(maxnow, primesused[i]);
  }
  if (maxnow >= n)
    cout << "not coprime" << '\n';
  else if (maxnow == 1)
    cout << "pairwise coprime" << '\n';
  else {
    cout << "setwise coprime" << '\n';
  }
}
