#include <bits/stdc++.h>
using namespace std;
template <class T>
void print(const T& x) {
  cout << x << "\n";
}
template <class T, class... A>
void print(const T& first, const A&... rest) {
  cout << first << " ";
  print(rest...);
}
struct PreMain {
  PreMain() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);
  }
} premain;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int(i) = 0; (i) < (int)(N); ++(i)) cin >> A[i];
  map<long long, int> res;
  for (int(i) = 0; (i) < (int)(N); ++(i)) {
    long long tmp = A[i];
    for (long long a = 2; a * a <= A[i]; a++) {
      int cnt = 0;
      while (tmp % a == 0) {
        cnt++;
        tmp /= a;
      }
      if (cnt > 0) res[a] += 1;
    }
    if (tmp > 1) res[tmp] += 1;
  }
  bool pairwise = true;
  for (auto e : res) {
    if (e.second >= 2) {
      pairwise = false;
      break;
    }
  }
  if (pairwise) {
    print("pairwise coprime");
    return 0;
  }
  int d = 0;
  for (int(i) = 0; (i) < (int)(N); ++(i)) {
    d = gcd(A[i], d);
  }
  if (d == 1) {
    print("setwise coprime");
  } else {
    print("not coprime");
  }
  return 0;
}
