#include <bits/stdc++.h>
using namespace std;
int n, m, mm, tc = 1, sz;
int cnt[1000006];
vector<int> pr;
bool pairwise, setwise, atLeastOne;
bool ifnotPrime(int prime[], int x) {
  return (prime[x / 64] & (1 << ((x >> 1) & 31)));
}
bool makeComposite(int prime[], int x) {
  prime[x / 64] |= (1 << ((x >> 1) & 31));
}
void bitWiseSieve(int n) {
  int prime[n / 64];
  memset(prime, 0, sizeof(prime));
  for (int i = 3; i * i <= n; i += 2) {
    if (!ifnotPrime(prime, i))
      for (int j = i * i, k = i << 1; j < n; j += k) makeComposite(prime, j);
  }
  pr.push_back(2);
  for (int i = 3; i <= n; i += 2)
    if (!ifnotPrime(prime, i)) pr.push_back(i);
}
void primeFactor(int x) {
  int X = x;
  for (int i = 0; i < sz && pr[i] * pr[i] <= X; i++) {
    if (x % pr[i] == 0) {
      cnt[pr[i]]++;
      if (cnt[pr[i]] > 1) {
        pairwise = 1;
      }
      while (x % pr[i] == 0) {
        x /= pr[i];
      }
    }
  }
  if (x > 1) {
    cnt[x]++;
    if (cnt[x] > 1) {
      pairwise = 1;
    }
  }
}
void solve(int kk) {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int aa;
    cin >> aa;
    primeFactor(aa);
  }
  for (auto it : pr) {
    if (cnt[it] == n) atLeastOne = 1;
  }
  if (!pairwise)
    cout << "pairwise coprime\n";
  else
    (!atLeastOne) ? cout << "setwise coprime\n" : cout << "not coprime\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int kk = 0;
  bitWiseSieve(sqrt(1e6));
  sz = pr.size();
  while (++kk <= tc) solve(kk);
  return 0;
}
