#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
vector<bool> Sieve(int n) {
  vector<bool> is_prime(n + 1, true);
  is_prime[0] = is_prime[1] = false;
  for (int i = 2; i <= n; i++) {
    if (is_prime[i] && (long long)i * i <= n) {
      for (int j = i * i; j <= n; j += i) is_prime[j] = false;
    }
  }
  return is_prime;
}
void solve() {
  vector<bool> pri = Sieve(1000000);
  vector<int> xx;
  for (int i = 1; i <= 1000000; i++) {
    if (pri[i]) xx.push_back(i);
  }
  int n;
  cin >> n;
  vector<int> v(n);
  bool ppos = 1;
  map<int, int> prims;
  int curr = 0;
  for (long long i = 0; i < n; i++) {
    cin >> v[i];
    if (i == 0) curr = v[i];
    int rr = gcd(curr, v[i]);
    curr = rr;
    if (ppos) {
      if (pri[v[i]]) {
        prims[v[i]] = 1;
      } else {
        int j = lower_bound(xx.begin(), xx.end(), v[i]) - xx.begin();
        for (int k = j; k > -1; k--) {
          if (v[i] % xx[k] == 0) {
            if (prims[xx[k]]) {
              ppos = 0;
              break;
            } else {
              prims[xx[k]] = 1;
            }
          }
        }
      }
    }
  }
  if (ppos) {
    cout << "pairwise coprime"
         << "\n";
  } else if (curr == 1) {
    cout << "setwise coprime"
         << "\n";
  } else {
    cout << "not coprime"
         << "\n";
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  solve();
  return 0;
}
