#include <bits/stdc++.h>
using namespace std;
template <class A>
void pr(A a) {
  cout << (a) << endl;
}
template <class A, class B>
void pr(A a, B b) {
  cout << a << " ";
  pr(b);
}
template <class A, class B, class C>
void pr(A a, B b, C c) {
  cout << a << " ";
  pr(b, c);
}
template <class A, class B, class C, class D>
void pr(A a, B b, C c, D d) {
  cout << a << " ";
  pr(b, c, d);
}
template <class T>
void pr_vec(vector<T>& v, char ep = ' ') {
  int n = v.size();
  for (int ni = 0; ni < int(n); ++ni) {
    cout << v[ni];
    if (ni != n - 1) cout << ep;
  }
  cout << endl;
};
template <class T>
inline bool chmin(T& a, T b) {
  return a > b ? a = b, true : false;
}
template <class T>
inline bool chmax(T& a, T b) {
  return a < b ? a = b, true : false;
}
int count_prime(int n) {
  int p = 0;
  vector<int> prime(n + 1, true);
  prime[0] = prime[1] = false;
  for (int i = 2; i <= n; i++)
    if (prime[i]) {
      p++;
      for (int j = i * 2; j <= n; j += i) prime[j] = false;
    }
  return p;
}
long long gcd(long long a, long long b) { return (b == 0) ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
int main(void) {
  int N;
  cin >> N;
  vector<int> A(N);
  int n = 1000005;
  vector<int> v(n);
  for (int i = 0; i < int(N); ++i) cin >> A[i];
  for (int i = 0; i < int(N); ++i) v[A[i]]++;
  long long g = gcd(A[0], A[1]);
  for (int i = 1; i < N - 1; i++) {
    g = gcd(g, A[i + 1]);
  }
  int p = 0;
  vector<int> prime(n + 1, true);
  prime[0] = prime[1] = false;
  for (int i = 2; i <= n; i++)
    if (prime[i]) {
      p++;
      for (int j = i * 2; j <= n; j += i) prime[j] = false;
    }
  vector<long long> ans(n);
  for (int i = 2; i < n; i++) {
    if (!prime[i]) continue;
    long long t = i;
    while (t < n) {
      ans[i] += v[t];
      t += i;
    }
  }
  long long m = 0;
  for (int i = 0; i < int(n); ++i) {
    chmax(m, ans[i]);
  }
  if (m == 1) {
    pr("pairwise coprime");
  } else if (g == 1) {
    pr("setwise coprime");
  } else {
    pr("not coprime");
  }
}
