#include <bits/stdc++.h>
static const long long MOD = 1000000007;
static const long long INF = 1000000000000000000LL;
using namespace std;
long long euclidean_gcd(long long a, long long b) {
  if (a < b) return euclidean_gcd(b, a);
  long long r;
  while ((r = a % b)) {
    a = b;
    b = r;
  }
  return b;
}
int solve() {
  string pc = "pairwise coprime";
  string sc = "setwise coprime";
  string nc = "not coprime";
  long long N;
  cin >> N;
  vector<long long> a;
  long long cnt = 0;
  for (long long i = 0; i < (N); i++) {
    long long tmp;
    cin >> tmp;
    if (tmp == 1) {
      ++cnt;
      continue;
    }
    a.push_back(tmp);
  }
  N -= cnt;
  if (N <= 1) {
    cout << pc << endl;
    return 0;
  }
  bool pcFlg = true;
  for (int i = 0; i < N - 1; ++i) {
    for (int j = i + 1; j < N; ++j) {
      long long g;
      g = euclidean_gcd(a[i], a[j]);
      if (g != 1) {
        pcFlg = false;
        break;
      }
    }
  }
  if (pcFlg) {
    cout << pc << endl;
    return 0;
  }
  long long gc = euclidean_gcd(a[0], a[1]);
  for (int i = 2; i < N; ++i) {
    gc = euclidean_gcd(gc, a[i]);
  }
  if (gc == 1) {
    cout << sc << endl;
    return 0;
  }
  cout << nc << endl;
  return 0;
}
int main() {
  solve();
  return 0;
}
