#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  vector<int> v(n);
  set<int> s;
  int i, j;
  bool b = 0;
  int maxi = INT_MIN;
  int count_1 = 0;
  for (i = 0; i < n; i++) {
    cin >> v[i];
    maxi = max(maxi, v[i]);
    if (v[i] == 1) {
      count_1++;
      b = 1;
    }
  }
  vector<int> sieve(maxi + 1, -1);
  sieve[1] = 1;
  for (i = 2; i * i <= maxi; i++) {
    if (sieve[i] != -1) continue;
    for (j = i; j <= maxi; j = j + i) {
      if (sieve[j] == -1) sieve[j] = i;
    }
  }
  bool f = 1;
  map<int, int> m;
  for (auto it = v.begin(); it != v.end(); it++) {
    int val = *it;
    while (val > 1) {
      int x = sieve[val];
      if (x == -1) break;
      m[x]++;
      while (val % x == 0) val = val / x;
    }
  }
  bool se = 1;
  for (auto it = m.begin(); it != m.end(); it++) {
    if (it->second > 1) f = 0;
    if (it->second >= v.size() - count_1) se = 0;
  }
  if (f == 1) {
    cout << "pairwise coprime" << endl;
    return;
  }
  if (se == 1 || b == 1) {
    cout << "setwise coprime" << endl;
    return;
  }
  cout << "not coprime" << endl;
}
int main() {
  int t = 1;
  while (t--) solve();
  return 0;
}
