#include <bits/stdc++.h>
using namespace std;
long long n;
long long a[1000001];
vector<long long> v;
map<long long, long long> mp;
long long isp[1000001];
long long mx = -2e18;
void buildprime() {
  isp[0] = isp[1] = 1;
  for (long long i = 2; i < 1000001; i++) {
    if (isp[i]) continue;
    for (long long j = i + i; j < 1000001; j += i) isp[j] = 1;
  }
  for (long long i = 2; i < 1000001; i++)
    if (!isp[i]) v.push_back(i);
}
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
bool ispairwise() {
  for (long long i = 0; i < n; i++) {
    long long x = a[i];
    for (long long i = 0; i < v.size(); i++) {
      if (v[i] * v[i] > x) break;
      if (x % v[i] == 0) {
        mp[v[i]]++;
        while (x % v[i] == 0) {
          x /= v[i];
        }
      }
    }
    if (x != 1) mp[x]++;
  }
  for (long long i = 0; i < v.size(); i++) {
    if (isp[mx] == 0) {
      if (v[i] > mx) break;
    } else {
      if (v[i] * v[i] > mx) break;
    }
    if (mp[v[i]] > 1) return false;
  }
  return true;
}
bool issetwise() {
  long long res = a[0];
  for (long long i = 0; i < n; i++) {
    res = gcd(res, a[i]);
  }
  return res == 1;
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  buildprime();
  cin >> n;
  vector<long long> w;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    long long x = isp[a[i]] ? sqrt(a[i]) : a[i];
    w.push_back(x);
  }
  long long mxx = -1;
  for (long long i = 0; i < n; i++) {
    if (mxx < v[i]) {
      mxx = v[i];
      mx = a[i];
    }
  }
  bool isp = ispairwise();
  bool iss = issetwise();
  if (isp) {
    cout << "pairwise coprime" << endl;
    return 0;
  } else if (iss) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
