#include <bits/stdc++.h>
using namespace std;
const int maxn = 2000001;
int c[maxn], mark[maxn];
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  assert(n >= 2);
  int a[n];
  memset(c, 0, sizeof c);
  bool not_pairwise = false;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] != 1) v.push_back(a[i]);
  }
  n = v.size();
  if (n <= 0) {
    cout << "pairwise coprime\n";
    return 0;
  }
  for (int i = 0; i < n; i++) {
    c[v[i]]++;
  }
  int g = 1;
  for (int i = 0; i < n; i++) {
    if (i == 0)
      g = v[0];
    else
      g = gcd(v[i], g);
  }
  if (!not_pairwise) {
    memset(mark, 0, sizeof mark);
    for (int i = 2; i < maxn; i++) {
      if (mark[i]) continue;
      int cnt = 0;
      for (int j = i; j < maxn; j += i) {
        if (c[j]) cnt += c[j];
        mark[j] = 1;
      }
      if (cnt > 1) {
        not_pairwise = true;
      }
    }
  }
  string ans = "";
  if (!not_pairwise and n > 1) {
    ans = "pairwise coprime\n";
  } else {
    if (g == 1) {
      ans = "setwise coprime\n";
    } else
      ans = "not coprime\n";
  }
  cout << ans << endl;
  return 0;
}
