#include <bits/stdc++.h>
using namespace std;
inline void R_P(vector<int> &vec) {
  int temp;
  cin >> temp;
  vec.push_back(temp);
}
inline bool checkMax(int &base, int test) {
  return (test > base) ? base = test, true : false;
}
inline bool checkMin(int &base, int test) {
  return (test < base) ? base = test, true : false;
}
template <class T>
void test(vector<T> &vec, const string &warn) {
  cout << warn << '\n';
  for (int i = (0); i < (vec.size()); i++) cout << vec[i] << ' ';
  cout << "\nTest end..............\n";
}
int n;
bool prime[1001];
vector<int> primes;
int gcd(int a, int b) {
  if (a < b) swap(a, b);
  while (a != 0 && b != 0) {
    a %= b;
    if (a != 0) b %= a;
  }
  return a + b;
}
int main() {
  std::ios::sync_with_stdio(false), cin.tie(NULL);
  for (int i = (2); i < (1001); i++) prime[i] = true;
  for (int i = (2); i < (1001); i++) {
    if (!prime[i]) continue;
    primes.emplace_back(i);
    int r = 1;
    while (++r * i <= 1000) prime[i * r] = false;
  }
  cin >> n;
  vector<int> vec(n, 0);
  for (int i = (0); i < (n); i++) cin >> vec[i];
  set<int> se;
  bool ok = true;
  for (int X : vec) {
    for (int pri : primes) {
      if (X % pri == 0) {
        while (X % pri == 0) X /= pri;
        if (se.count(pri)) ok = false;
        se.insert(pri);
      }
    }
    if (X != 1) {
      if (se.count(X)) ok = false;
      se.insert(X);
    }
  }
  if (ok) {
    cout << "pairwise coprime\n";
    return 0;
  }
  int tmp = gcd(vec[0], vec[1]);
  for (int i = (2); i < (n); i++) tmp = gcd(tmp, vec[2]);
  if (tmp == 1) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
  return 0;
}
