#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (auto& a : A) {
    cin >> a;
  }
  sort(A.begin(), A.end());
  vector<map<int, bool>> factrized(N);
  vector<int> allPrimes;
  bool hasPair = false;
  bool hasSet = false;
  for (int p = 2; p * p <= A.back(); ++p) {
    int numPdevide = 0;
    for (int i = 0; i < N; ++i) {
      if (A[i] % p == 0) {
        ++numPdevide;
        factrized[i].emplace(p, true);
        allPrimes.push_back(p);
        while (A[i] % p == 0) {
          A[i] /= p;
        }
      }
    }
    if (numPdevide >= 2) {
      hasPair = true;
      if (numPdevide == N) {
        hasSet = true;
      }
    }
  }
  if (!hasPair) {
    cout << "pairwise coprime" << endl;
  } else if (!hasSet) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
