#include <bits/stdc++.h>
using namespace std;
void g_dir(vector<vector<pair<long long, long long> > > &graph, long long a,
           long long b, long long w = 1) {
  graph[a].push_back(pair<long long, long long>(b, w));
}
void g_undir(vector<vector<pair<long long, long long> > > &graph, long long a,
             long long b, long long w = 1) {
  g_dir(graph, a, b, w);
  g_dir(graph, b, a, w);
}
template <class T>
void chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
  }
}
template <class T>
void chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
  }
}
const long long INF = 1145141919;
const long long MOD = 1000000007;
const long long NUM = 101010;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int main() {
  long long N;
  cin >> N;
  vector<long long> A(N + 1, 0);
  for (long long(i) = 1; (i) <= (N); (i)++) cin >> A[i];
  long long al = A[1];
  long long pa = 1;
  for (long long(i) = 1; (i) <= (N); (i)++) al = gcd(al, A[i]);
  set<long long> S;
  for (long long(n) = 1; (n) <= (N); (n)++) {
    long long x = A[n];
    set<long long> s;
    for (long long i = 2; i * i <= x; i++) {
      while (x % i == 0) {
        s.insert(i);
        x /= i;
      }
    }
    if (x > 1) s.insert(x);
    for (auto y : s) {
      if (S.find(y) == S.end()) {
        S.insert(y);
      } else {
        pa = 0;
      }
    }
  }
  if (pa)
    cout << "pairwise coprime" << endl;
  else if (al == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
