#include <bits/stdc++.h>
using namespace std;
const int mxN = 1000010;
int spf[mxN];
void sieve() {
  spf[1] = 1;
  for (int i = 2; i < mxN; i++) {
    spf[i] = i;
  }
  for (int i = 4; i < mxN; i += 2) {
    spf[i] = 2;
  }
  for (int i = 3; i * i < mxN; i++) {
    if (spf[i] == i) {
      for (int j = i * i; j < mxN; j += i) {
        if (spf[j] == j) spf[j] = i;
      }
    }
  }
}
vector<int> getFactorization(int n) {
  vector<int> res;
  while (n != 1) {
    res.emplace_back(spf[n]);
    n = n / spf[n];
  }
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  sieve();
  int n;
  cin >> n;
  vector<int> cnt(mxN, 0);
  for (int _ = 0; _ < (n); _++) {
    int a;
    cin >> a;
    auto f = getFactorization(a);
    vector<bool> isCnt(mxN, true);
    for (auto&& e : f) {
      if (isCnt[e]) {
        cnt[e]++;
        isCnt[e] = false;
      }
    }
  }
  bool pc = true, sc = true;
  for (int i = 0; i < (mxN); i++) {
    if (cnt[i] > 1) pc = false;
    if (cnt[i] == n) sc = false;
  }
  if (pc) {
    cout << "pairwise coprime";
  } else if (sc) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
  return 0;
}
