#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int n, tot;
int a[N];
int prime[N], vis[N], cnt[N];
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
void Euler() {
  vis[1] = 1;
  for (int i = 2; i < N; ++i) {
    if (vis[i] == 0) prime[++tot] = i;
    for (int j = 1; j <= tot && i * prime[j] < N; ++j) {
      vis[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
    }
  }
}
int main(void) {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  cin >> n;
  Euler();
  for (int i = 0; i < n; ++i) cin >> a[i];
  bool f1 = true;
  int g = a[0];
  for (int i = 0; i < n; ++i) {
    g = gcd(g, a[i]);
    int aa = a[i];
    for (int j = 1; j <= tot; ++j) {
      if (vis[aa]) {
        ++cnt[aa];
        break;
      }
      if (aa % prime[j] == 0) {
        if (cnt[prime[j]]) f1 = false;
        ++cnt[prime[j]];
        while (aa % prime[j] == 0) {
          aa /= prime[j];
        }
      }
      if (aa == 1) break;
    }
  }
  if (f1)
    cout << "pairwise coprime" << endl;
  else {
    if (g == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
  return 0;
}
