#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int sz = 1e6 + 1;
bool primes[sz];
vector<int> g(sz);
void solve() {
  int n;
  cin >> n;
  set<int> input;
  for (int i = 0; i < n; ++i) {
    int a;
    cin >> a;
    input.insert(a);
  }
  fill(g.begin(), g.end(), 0);
  fill(primes, primes + n + 1, true);
  primes[0] = false;
  primes[1] = false;
  int M = *input.rbegin();
  for (int i = 2; i * i <= M; i++) {
    if (primes[i]) {
      for (int j = 2 * i; j <= M; j += i) {
        primes[j] = false;
        if (input.count(j)) g[i]++;
      }
    }
  }
  bool pairwise = true;
  bool setwise = true;
  for (int i = 2; i <= M; ++i) {
    pairwise = pairwise && (g[i] < 2);
    setwise = setwise && (g[i] < n);
  }
  if (pairwise)
    cout << "pairwise coprime\n";
  else if (setwise)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int t = 1;
  while (t--) {
    solve();
  }
}
