#include <bits/stdc++.h>
using namespace std;
vector<int> divisor(int n) {
  vector<int> ret;
  for (int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      ret.push_back(i);
      if (i * i != n) ret.push_back(n / i);
    }
  }
  sort(begin(ret), end(ret));
  return (ret);
}
int main() {
  int N;
  int A[1001001];
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  bool s1[1001001];
  for (int i = 0; i < 1001001; i++) {
    s1[i] = false;
  }
  bool isPairwiseCoprime = true;
  for (int i = 0; i < N; i++) {
    vector<int> div = divisor(A[i]);
    for (int j = 0; j < div.size(); j++) {
      if (div[j] == 1) {
        continue;
      }
      if (s1[div[j]]) {
        isPairwiseCoprime = false;
      } else {
        s1[div[j]] = true;
      }
    }
  }
  if (isPairwiseCoprime) {
    cout << "pairwise coprime" << endl;
  } else if (false) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
