#include <bits/stdc++.h>
using namespace std;
int n, a[4000005], ok;
int vis[4000005], prime[4000005], tot, judge[4000005];
void init() {
  memset(vis, -1, sizeof(vis));
  tot = 0;
  for (int i = 2; i <= 2000000; i++) {
    if (vis[i] == (-1)) {
      tot++;
      prime[tot] = i;
    }
    for (int j = 1; j <= tot && prime[j] * i <= 2000000; 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 cmp(int x, int y) { return x < y; }
int main() {
  ok = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  sort(a + 1, a + 1 + n, cmp);
  for (int i = 1; i < n; i++) {
    if (gcd(a[i], a[i + 1]) != 1) {
      ok = 1;
      break;
    }
  }
  for (int i = 1; i < n - 1; i++) {
    if (gcd(a[i], a[i + 2]) != 1) {
      ok = 1;
      break;
    }
  }
  if (ok == 1) {
    ok = 0;
    int 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);
  }
}
