#include <bits/stdc++.h>
using namespace std;
int GCD(int a, int b) {
  if (b == 0)
    return a;
  else
    return GCD(b, a % b);
}
void solve(int N, std::vector<int> A) {
  vector<int> counts(1000001, 0);
  for (int ai = 0; ai < N; ++ai) {
    int a = A[ai];
    for (int i = 2; i * i <= A[ai]; ++i) {
      if (a % i == 0) {
        counts[i] += 1;
      }
      while (a % i == 0) {
        a /= i;
      }
    }
    if (a != 1) {
      counts[a] += 1;
    }
  }
  int max = *std::max_element(counts.begin(), counts.end());
  if (max <= 1) {
    cout << "pairwise coprime" << endl;
    return;
  }
  int n = A[0];
  for (int i = 0; i < N; ++i) {
    n = GCD(n, A[i]);
  }
  if (n == 1) {
    cout << "setwise coprime" << endl;
    return;
  }
  cout << "not coprime" << endl;
}
int main() {
  int N;
  scanf("%d", &N);
  std::vector<int> A(N);
  for (int i = 0; i < N; i++) {
    scanf("%d", &A[i]);
  }
  solve(N, std::move(A));
  return 0;
}
