#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (long long i = 0; i < (N); i++) cin >> A[i];
  int X = A[0];
  for (long long i = 0; i < (N); i++) X = gcd(X, A[i]);
  if (X != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  vector<int> PP;
  PP.push_back(2);
  for (long long i = 0; i < (1000); i++) {
    int F = 1;
    for (long long j = 0; j < (PP.size()); j++) {
      if ((i + 3) % PP[j] == 0) {
        F = 0;
        break;
      }
    }
    if (F) PP.push_back(i + 3);
  }
  map<int, int> M;
  for (long long i = 0; i < (N); i++) {
    int tmp = A[i];
    for (long long j = 0; j < (PP.size()); j++) {
      if (A[i] % PP[j] == 0) {
        M[PP[j]]++;
        while (A[i] % PP[j] == 0) {
          A[i] /= PP[j];
        }
      }
    }
    if (A[i] != 1 and A[i] == tmp) M[A[i]]++;
  }
  auto itr = M.begin();
  int ans = 0;
  for (long long i = 0; i < (M.size()); i++) {
    if (itr->second != 1) ans = 1;
    itr++;
  }
  if (ans)
    cout << "setwise coprime" << endl;
  else
    cout << "pairwise coprime" << endl;
}
