#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
using PII = pair<int, int>;
using PIL = pair<int, LL>;
using PLL = pair<LL, LL>;
inline void quickread() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cout << fixed << setprecision(10);
}
inline void print_vector(vector<int>& A) {
  for (auto&& x : A) {
    cout << x << " ";
  }
  cout << endl;
}
inline void print_array(const int A[], int n) {
  for (int i = 0; i < n; ++i) {
    if (i < n - 1) {
      cout << A[i] << " ";
    } else {
      cout << A[i] << endl;
    }
  }
}
bool fac(set<int>& visit, int x) {
  int i = 2;
  vector<int> f;
  while (x > 1 && i < (int)sqrt(x) + 1) {
    while (x % i == 0) {
      x = x / i;
      f.push_back(i);
    }
    i++;
  }
  int pre = -1;
  for (auto&& x : f) {
    if (x == pre)
      continue;
    else {
      pre = x;
      if (visit.find(x) == visit.end()) {
        visit.insert(x);
      } else {
        return false;
      }
    }
  }
  return true;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  a %= b;
  return gcd(b, a);
}
inline void solve() {
  int n;
  cin >> n;
  int A[n];
  for (int i = 0; i < n; ++i) cin >> A[i];
  bool pc = true;
  set<int> visit;
  int cur = A[0];
  fac(visit, A[0]);
  for (int i = 1; i < n; ++i) {
    bool test;
    if (pc) {
      test = fac(visit, A[i]);
      if (!test) pc = false;
    }
    cur = gcd(cur, A[i]);
  }
  if (pc) {
    cout << "pairwise coprime" << endl;
    return;
  } else {
    if (cur == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
}
int main() {
  quickread();
  int t = 1;
  for (int _ = 0; _ < t; _++) {
    solve();
  }
  return 0;
}
