#include <bits/stdc++.h>
using namespace std;
vector<int> prime_factorization(int a) {
  vector<int> res;
  int i = 2;
  while (i <= a * a) {
    if (a % i == 0) {
      res.push_back(i);
      a /= i;
    } else
      i++;
  }
  if (a != 1) res.push_back(a);
  return res;
}
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 : A) cin >> i;
  vector<vector<int>> prime_factors_unique;
  for (int& i : A) {
    prime_factors_unique.push_back(prime_factorization(i));
  }
  for (vector<int>& i : prime_factors_unique) {
    i.erase(unique(i.begin(), i.end()), i.end());
  }
  bool pairwise_coprime = true;
  unordered_set<int> prime_factors_unordered_set;
  for (vector<int>& i : prime_factors_unique) {
    for (int& j : i) {
      if (prime_factors_unordered_set.find(j) !=
          prime_factors_unordered_set.end()) {
        pairwise_coprime = false;
        break;
      }
      prime_factors_unordered_set.insert(j);
    }
    if (!pairwise_coprime) break;
  }
  if (pairwise_coprime) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int A_gcd = A.front();
  for (int i = 1; i < N; i++) A_gcd = gcd(A[i], A_gcd);
  if (A_gcd == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
