#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const int INF = 1e9;
const double EPS = 1e-9;
const ll MOD = 1e9 + 7;
int main() {
  long long N;
  scanf("%lld", &N);
  std::vector<long long> A(N);
  for (int i = 0; i < N; i++) {
    scanf("%lld", &A[i]);
  }
  map<int, int> mp;
  for (int i = 0; i < N; ++i) {
    for (int j = 2; j * j <= A[i] + 10; ++j) {
      if (A[i] % j != 0) continue;
      while (A[i] % j == 0) {
        A[i] /= j;
      }
      mp[j]++;
    }
  }
  int max_ = 0;
  for (auto &e : mp) {
    max_ = max(max_, e.second);
  }
  if (max_ <= 1)
    cout << "pairwise coprime" << endl;
  else if (max_ < N)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
