#include <bits/stdc++.h>
using namespace std;
const long long MOD = 998244353;
const long long mod = 1000000007;
const long long INF = 1e15;
const double DEL = 1e-6;
long long yaku(long long a, long long b) {
  if (a > b) return yaku(b, a);
  return b % a ? yaku(b % a, a) : a;
}
vector<long long> Sosu;
void Eratosthenes(long long N, vector<long long> &ret) {
  vector<bool> a(N + 1, true);
  a.at(0) = false;
  a.at(1) = false;
  for (int i = (int)2; i < (int)N + 1; i++) {
    if (a.at(i))
      for (long long k = 2 * i; k <= N; k += i) a.at(k) = false;
  }
  for (int i = (int)0; i < (int)N + 1; i++)
    if (a.at(i)) ret.push_back(i);
  return;
}
void init(long long N) {
  long long BIG = N, SMALL = 0;
  while (BIG > SMALL + 1) {
    long long MID = (BIG + SMALL) / 2;
    if (MID * MID >= N)
      BIG = MID;
    else
      SMALL = MID;
  }
  Eratosthenes(BIG + 3, Sosu);
}
const long long MAXN = 1000010;
bool Toku(vector<bool> &used, long long N) {
  if (N == 1) return false;
  for (int i = 0; Sosu.at(i) * Sosu.at(i) <= N; i++) {
    long long k = Sosu.at(i);
    long long count = 0;
    while (true) {
      if (N % k != 0) break;
      count++;
      N /= k;
    }
    if (count != 0) {
      if (used[k])
        return false;
      else
        used[k] = true;
    }
  }
  if (used[N]) return false;
  used[N] = true;
  return true;
}
string Solve() {
  long long N;
  cin >> N;
  vector<long long> d(N);
  for (int i = (int)0; i < (int)N; i++) cin >> d[i];
  long long memo = d[0];
  for (int i = (int)1; i < (int)N; i++) {
    memo = yaku(d[i], memo);
    if (memo == 1) break;
  }
  if (memo > 1) return "not coprime";
  bool all_one = true;
  for (int i = (int)0; i < (int)N; i++)
    if (d[i] > 1) all_one = false;
  if (all_one) return "pairwise coprime";
  init(MAXN);
  vector<bool> used(MAXN, false);
  for (int i = (int)0; i < (int)N; i++)
    if (!Toku(used, d[i])) return "setwise coprime";
  return "pairwise coprime";
}
int main() { cout << Solve() << endl; }
