#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a < b) return gcd(b, a);
  if (b > 0) {
    return gcd(b, a % b);
  } else {
    return (a);
  }
}
int main(void) {
  long N;
  cin >> N;
  vector<long> A(N);
  long maxval = 0;
  for (size_t i = 0; i < N; i++) {
    cin >> A[i];
    maxval = max(maxval, A[i]);
  }
  vector<int> D(maxval + 1, -1);
  vector<int> F(maxval + 1, maxval + 1);
  for (int i = 2; i <= maxval; i++) {
    if (D[i] == -1) {
      int j = i;
      while (j <= maxval) {
        D[j] = i;
        j += i;
      }
      D[i] = i;
    }
  }
  int g = A[0];
  for (size_t i = 1; i < N; i++) {
    g = gcd(A[i], g);
  }
  for (size_t i = 0; i < N; i++) {
    int a = A[i];
    while (D[a] != a) {
      int f = D[a];
      if (F[f] < i) {
        if (g == 1) {
          cout << "setwise coprime" << endl;
        } else {
          cout << "not coprime" << endl;
        }
        return 0;
      }
      F[f] = i;
      a = a / f;
    }
    F[a] = i;
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
