#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
long long GCD(long long a, long long b) {
  if (b == 0) return a;
  return GCD(b, a % b);
}
int D[1000001];
int prime[1000001];
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  int wholegcd = 0, maxA = 0;
  for (long long i = 0; i < (long long)(n); ++i) {
    cin >> a[i];
    chmax(maxA, a[i]);
    if (i == 0)
      wholegcd = a[i];
    else
      wholegcd = GCD(wholegcd, a[i]);
  }
  D[1] = 1;
  for (int i = 2; i <= maxA; i++) {
    if (D[i] != 0) continue;
    D[i] = i;
    for (int j = i; i * j <= maxA; j++) {
      if (D[i * j] == 0) D[i * j] = i;
    }
  }
  bool pairwise = true;
  for (long long i = 0; i < (long long)(n); ++i) {
    int now = a[i];
    if (now != 1 && prime[now] == 1) {
      pairwise = false;
      break;
    }
    prime[now] = 1;
    while (D[now] != now) {
      if (prime[D[now]] == 1) {
        pairwise = false;
        break;
      }
      prime[D[now]] = 1;
      now /= D[now];
      if (now == D[now]) continue;
      if (prime[now] == 1) {
        pairwise = false;
        break;
      }
      prime[now] = 1;
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (wholegcd == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
