#include <bits/stdc++.h>
using namespace std;
int n, a[5000005], ok;
int vis[5000005], prime[5000005], tot, judge[5000005];
void init() {
  memset(vis, -1, sizeof(vis));
  tot = 0;
  for (int i = 2; i <= 1000000; i++) {
    if (vis[i] == (-1)) {
      tot++;
      prime[tot] = i;
    }
    for (int j = 1; j <= tot && prime[j] * i <= 1000000; j++) {
      vis[prime[j] * i] = 1;
      if (i % prime[j] == 0) break;
    }
  }
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  init();
  ok = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int x;
  for (int i = 1; i <= n && ok == 0; i++) {
    x = a[i];
    for (int j = 1; j <= tot && prime[j] <= x; j++) {
      if (x % prime[j] == 0) {
        judge[j]++;
        if (judge[j] > 1) {
          ok = 1;
          break;
        }
        while (x % prime[i] == 0) x /= prime[i];
      }
    }
  }
  if (ok == 1) {
    ok = 0;
    long long zz = gcd(a[1], a[2]);
    for (int i = 1; i <= n; i++) {
      zz = gcd(zz, a[i]);
    }
    if (zz == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  } else {
    cout << "pairwise coprime" << endl;
    exit(0);
  }
}
