#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int q[N], cnt[N], primes[N], ct;
bool st[N];
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
void getprimes(int n) {
  for (int i = 2; i <= n; i++) {
    if (!st[i]) primes[ct++] = i;
    for (int j = 0; i * primes[j] <= n; j++) {
      st[i * primes[j]] = true;
      if (i % primes[j] == 0) break;
    }
  }
}
int main() {
  int n;
  cin >> n;
  getprimes(n);
  int g = 0;
  bool pw = true;
  for (int i = 1; i <= n; i++) {
    cin >> q[i];
    g = gcd(g, q[i]);
    if (pw) {
      for (int j = 0; j < ct; j++) {
        if (q[i] % primes[j] == 0) {
          if (cnt[primes[j]] != 0) {
            pw = false;
          }
          cnt[primes[j]]++;
          break;
        }
      }
    }
  }
  if (pw) {
    cout << "pairwise coprime" << endl;
  } else {
    if (g == 1) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  }
}
