#include <bits/stdc++.h>
using namespace std;
vector<int> v;
set<int> pr;
bool vis[1000004];
void prime() {
  int x = sqrt(1000000);
  for (int i = 0; i < 1000005; i += 2) {
    vis[i] = true;
  }
  vis[2] = false;
  v.push_back(2);
  for (int i = 3; i <= x; i += 2) {
    if (!vis[i]) {
      v.push_back(i);
      for (int j = 2 * i; j < 100005; j += i) {
        if (!vis[j]) {
          vis[j] = true;
        }
      }
    }
  }
}
void solve() {
  prime();
  int n, i, j, k, cnt1 = 0, mx = -1;
  cin >> n;
  int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 1) {
      cnt1++;
    }
    mx = max(mx, a[i]);
  }
  memset(vis, 0, sizeof(vis));
  for (i = 0; i < n; i++) {
    if (v[i] > mx) {
      break;
    }
    for (j = 0; j < n; j++) {
      if (!vis[a[j]] && a[j] % v[i] == 0) {
        vis[a[j]] = true;
        pr.insert(v[i]);
      }
    }
  }
  if (cnt1 > 0) {
    if (n - cnt1 == pr.size()) {
      cout << "pairwise coprime" << endl;
    } else {
      cout << "setwise coprime" << endl;
    }
  } else {
    if (pr.size() == 1) {
      cout << "not coprime" << endl;
    } else if (pr.size() == n) {
      cout << "pairwise coprime" << endl;
    } else {
      cout << "setwise coprime" << endl;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  t = 1;
  while (t--) {
    solve();
  }
}
