#include <bits/stdc++.h>
using namespace std;
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 < N; ++i) cin >> A[i];
  int MAX_A = 1e6 + 2;
  vector<int> used(MAX_A);
  for (int i = 0; i < N; ++i) {
    for (long long j = 2; j * j <= A[i]; ++j) {
      if (A[i] % j == 0) ++used[j];
    }
    ++used[A[i]];
  }
  bool pairwise = true;
  for (int i = 0; i < MAX_A; ++i) {
    if (used[i] >= 2) pairwise = false;
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int g = A[0];
  for (int i = 0; i < N; ++i) g = gcd(g, A[i]);
  if (g == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
