#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
const long long INF = 1ll << 60;
const long long MOD = 1e9 + 7ll;
const double PI = 3.14159265358979323846;
long long gcd(long long n, long long m) {
  if (m > n) {
    long long c = n;
    n = m;
    m = c;
  }
  if (n % m == 0ll)
    return m;
  else
    return gcd(m, n % m);
}
vector<long long> fpf_prepare(long long a) {
  vector<long long> res(a + 1);
  for (int i = 2; i < a + 1; i++) {
    if (res[i] == 0) {
      for (int k = 1; i * k <= a; k++) {
        res[i * k] = i;
      }
    }
  }
  return res;
}
int main() {
  int n;
  cin >> n;
  vector<long long> A(n);
  auto D = fpf_prepare(1000010);
  vector<bool> p(1000010, false);
  bool flag;
  for (int i = 0; i < n; i++) {
    long long a;
    scanf("%lld", &a);
    A.at(i) = a;
    long long m = 1000000ll;
    while (a > 1ll) {
      if (D[a] < m && p[D[a]]) flag = true;
      p[D[a]] = true;
      m = D[a];
      a /= D[a];
    }
  }
  if (!flag) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long g = A[0];
  for (int i = 1; i < n; i++) {
    g = gcd(g, A[i]);
    if (g == 1) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  cout << "not coprime" << endl;
  return 0;
}
