#include <bits/stdc++.h>
using namespace std;
long long INF = 1e18;
long long mod = 1e9 + 7;
long long GCD(long long a, long long b) {
  if (a < 0) a = -a;
  if (b < 0) b = -b;
  if (b == 0)
    return a;
  else
    return GCD(b, a % b);
}
vector<pair<long long, long long> > prime_factorize(long long n) {
  vector<pair<long long, long long> > res;
  for (long long p = 2; p * p <= n; ++p) {
    if (n % p != 0) continue;
    int num = 0;
    while (n % p == 0) {
      ++num;
      n /= p;
    }
    res.push_back(make_pair(p, num));
  }
  if (n != 1) res.push_back(make_pair(n, 1));
  return res;
}
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  long long setwise = a[0];
  for (int i = 1; i <= n - 1; i++) {
    setwise = GCD(a[i], setwise);
  }
  set<long long> tree;
  bool p = true;
  for (int i = 0; i < n; i++) {
    int k = 1;
    auto res = prime_factorize(a[i]);
    auto iter = res.begin();
    while (iter != res.end()) {
      if (tree.find(iter->first) != tree.end()) {
        p = false;
      } else {
        tree.emplace(iter->first);
      }
      iter++;
    }
  }
  if (setwise != 1) {
    cout << "not coprime" << endl;
  } else if (p && setwise == 1) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
