#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a > b) swap(a, b);
  if (a == 0) return b;
  return gcd(b % a, a);
}
vector<long long> get_fact(long long a) {
  vector<long long> v;
  long long sqr = sqrt(a);
  for (long long i = 2; i <= sqr; i++) {
    if (i == sqr) {
      if (a % i == 0) {
        v.push_back(sqr);
      }
    } else {
      if (a % i == 0) {
        v.push_back(i);
        v.push_back(a / i);
      }
    }
  }
  v.push_back(a);
  return v;
}
long long checkpr(vector<long long> &v, long long n) {
  map<long long, long long> mp;
  for (long long i = 1; i <= n; i++) {
    vector<long long> fact = get_fact(v[i]);
    for (long long i = 0; i < fact.size(); i++) {
      if (mp.find(fact[i]) != mp.end()) return 0;
      mp[fact[i]] = 1;
    }
  }
  return 1;
}
long long checkst(vector<long long> &v, long long n) {
  long long gc = v[1];
  for (long long i = 2; i <= n; i++) {
    gc = gcd(gc, v[i]);
  }
  if (gc == 1)
    return 1;
  else
    return 0;
}
int main() {
  long long T;
  T = 1;
  while (T--) {
    long long n, m;
    cin >> n;
    vector<long long> v(n + 1, 0);
    for (long long i = 1; i <= n; i++) cin >> v[i];
    if (checkpr(v, n)) {
      cout << "pairwise coprime" << endl;
    } else if (checkst(v, n)) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  }
}
