#include <bits/stdc++.h>
using namespace std;
void factorize(long long n, vector<int> &prime_cnt) {
  if (n <= 1) return;
  int tmp = n;
  bool flag = false;
  long long l = sqrt(n);
  for (int i = 2; i <= l; i++) {
    if (tmp % i == 0) {
      int cnt = 0;
      while (tmp % i == 0) {
        cnt++;
        tmp /= i;
      }
      prime_cnt[i]++;
      flag = true;
    }
  }
  if (tmp != 1) {
    prime_cnt[tmp]++;
    flag = true;
  }
  if (!flag) {
    prime_cnt[n]++;
  }
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  vector<int> prime_cnt;
  prime_cnt.assign(1e6, 0);
  for (int i = 0; i < N; i++) {
    if (A[i] != 1) {
      factorize(A[i], prime_cnt);
    }
  }
  bool pw_cp = true;
  bool st_cp = true;
  for (auto val : prime_cnt) {
    if (val == 0) continue;
    if (val != 1) {
      pw_cp = false;
    }
    if (val == N) {
      st_cp = false;
    }
  }
  if (pw_cp) {
    cout << "pairwise coprime" << endl;
  } else if (st_cp) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
