#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  bool p = true;
  sort(a.begin(), a.end());
  if (a[n - 1] == 1) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  set<int> prime;
  for (int i = 0; i < n; i++) {
    int j = 2;
    if (prime.find(a[i]) != prime.end()) {
      p = false;
      goto END_REP;
    }
    prime.insert(a[i]);
    while (j * j <= a[i]) {
      if (a[i] % j == 0) {
        int q = a[i] / j;
        if (prime.find(j) != prime.end() || prime.find(q) != prime.end()) {
          p = false;
          goto END_REP;
        } else {
          prime.insert(j);
          prime.insert(q);
        }
      }
      j++;
    }
  }
END_REP:;
  if (p)
    cout << "pairwise coprime" << endl;
  else {
    int g = a[0];
    for (int i = 1; i < n; i++) g = gcd(g, a[i]);
    if (g == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
  return 0;
}
