#include <bits/stdc++.h>
using namespace std;
int a[1000007];
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int v[1000007];
bool vis[1000007];
inline void db() {
  memset(v, 0, sizeof v);
  for (int i = 2; i <= 1000; i++)
    if (!v[i]) {
      for (int j = i * i; j <= 1000000; j += i) {
        if (v[j] == 0) v[j] = i;
      }
    }
}
int n;
inline bool vali() {
  memset(vis, 0, sizeof vis);
  for (int i = 0; i < n; i++) {
    int x = a[i];
    while (v[x]) {
      if (vis[v[x]]) {
        return false;
      }
      vis[v[x]] = true;
      int ss = v[x];
      do {
        x /= ss;
      } while (x % ss == 0);
    }
  }
  return true;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  db();
  cin >> n;
  int g = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    g = gcd(g, a[i]);
  }
  if (g == 1) {
    if (vali()) {
      cout << "pairwise coprime\n";
    } else {
      cout << "setwise coprime\n";
    }
  } else {
    cout << "not coprime\n";
  }
}
