#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
const int MOD = 1000000007;
const int INF = 1001001001;
const int dy[] = {-1, 0, 1, 0};
const int dx[] = {0, -1, 0, 1};
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
vector<pair<ll, int>> factor(ll n) {
  vector<pair<ll, int>> res;
  for (ll i = 2; i * i <= n; i++) {
    if (n % i != 0) continue;
    int ex = 0;
    while (n % i == 0) {
      ex++;
      n /= i;
    }
    res.push_back({i, ex});
  }
  if (n != 1) res.push_back({n, 1});
  return res;
}
int main() {
  int n;
  cin >> n;
  map<int, int> mp;
  for (int i = 0; i < n; ++i) {
    int a;
    cin >> a;
    vector<pair<ll, int>> f;
    f = factor(a);
    for (auto x : f) {
      mp[x.first]++;
    }
  }
  int k = 0;
  for (auto x : mp) {
    k = max(k, x.second);
  }
  if (k == n)
    cout << "not coprime" << endl;
  else if (k > 1)
    cout << "setwise coprime" << endl;
  else
    cout << "pairwise coprime" << endl;
  return 0;
}
