#include <bits/stdc++.h>
int gcd(int x, int y) {
  if (x % y == 0) {
    return y;
  }
  return gcd(y, x % y);
}
int main() {
  using namespace std;
  int MAX_A = 1000000;
  vector<int> lp(MAX_A + 1, 0);
  vector<int> pr;
  int cnt = 0;
  vector<int> count(MAX_A + 1, 0);
  for (int i = 2; i <= MAX_A; i++) {
    if (lp[i] == 0) {
      lp[i] = i;
      pr.push_back(i);
    }
    for (int j = 0; j < pr.size() && pr[j] <= lp[i] && i * pr[j] <= MAX_A;
         j++) {
      lp[i * pr[j]] = pr[j];
    }
  }
  int N;
  cin >> N;
  vector<int> A(N);
  int GCD = 0;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    GCD = gcd(GCD, A[i]);
    while (A[i] > 1) {
      int div = lp[A[i]];
      if (count[div]) {
        cout << "setwise coprime" << endl;
        return 0;
      }
      count[div]++;
      while (A[i] % div == 0) {
        A[i] /= div;
      }
    }
  }
  if (GCD != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  cout << "pairwise coprime" << endl;
}
