#include <bits/stdc++.h>
using namespace std;
template <class T>
int64_t sum(vector<T> a);
template <class T>
double ave(vector<T> a);
template <typename T>
ostream& operator<<(ostream& s, const vector<T>& v);
uint64_t gcd(int64_t a, int64_t b);
uint64_t lcm(int64_t a, int64_t b);
uint64_t digit(int64_t n, int64_t base);
uint64_t digit(int64_t n);
vector<int64_t> digitbreak(int64_t n, int64_t base);
vector<int64_t> digitbreak(int64_t n);
bool flagdebug = false;
const int MAX = 1000000;
const int MOD = 1000000007;
long long fac[MAX], finv[MAX], inv[MAX];
vector<int64_t> divs(1000010, 0);
int64_t mx = 0;
void divisor2(int64_t n) {
  for (int64_t i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      divs[i]++;
      if (i >= 2) mx = max(mx, divs[i]);
      if (i * i != n) {
        divs[n / i]++;
        if (i >= 2) mx = max(mx, divs[i]);
      }
    }
  }
}
int main() {
  flagdebug = true;
  int64_t n;
  cin >> n;
  int64_t a;
  for (int i = 0; i < (int)(n); i++) {
    cin >> a;
    divisor2(a);
  }
  if (mx <= 1) {
    cout << "pairwise coprime" << endl;
  } else if (mx < n) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
template <typename T>
ostream& operator<<(ostream& s, const vector<T>& v) {
  s << "[\t";
  for (auto i = v.begin(); i < v.end() - 1; i++) {
    s << *i << "\t";
  }
  s << *(v.end() - 1) << "\t]\n";
  return s;
}
uint64_t gcd(int64_t a, int64_t b) {
  if (b != 0) {
    return gcd(b, a % b);
  }
  return a;
}
uint64_t lcm(int64_t a, int64_t b) { return a / gcd(a, b) * b; }
uint64_t digit(int64_t n, int64_t base) {
  if (n == 0) return 0;
  if (n < 0) n = -n;
  return log10(n) / log10(base) + 1;
}
uint64_t digit(int64_t n) {
  if (n == 0) return 0;
  if (n < 0) n = -n;
  return log10(n) + 1;
}
vector<int64_t> digitbreak(int64_t n, int64_t base) {
  vector<int64_t> a(base, 0);
  while (n >= base) {
    a[n % base]++;
    n /= base;
  }
  a[n]++;
  return a;
}
vector<int64_t> digitbreak(int64_t n) { return digitbreak(n, 10); }
