#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e6 + 1;
const int inf = 1e9 + 1;
const long long OO = 1e18;
const long long mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int n, mx = 0;
  cin >> n;
  vector<int> v(n);
  map<int, int> mp, d;
  for (int i = 0; i < n; i++) cin >> v[i], mp[v[i]]++, mx = max(mx, v[i]);
  vector<int> vis(MAX, 0);
  bool pairwise = 1, coprime = 1;
  for (int i = 2; i * i <= 1e6; i++) {
    if (i > mx) break;
    if (vis[i]) continue;
    for (int j = i; j <= 1e6; j += i) {
      if (j > mx) break;
      vis[j] = 1;
      if (mp[j]) {
        d[i] += mp[j];
        if (d[i] > 1) pairwise = 0;
        if (d[i] == n) coprime = 0;
      }
    }
  }
  if (pairwise)
    cout << "pairwise coprime";
  else {
    cout << (coprime ? "setwise coprime" : "not coprime");
  }
  return 0;
}
