#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int main() {
  int n;
  cin >> n;
  vector<int> G(n);
  for (int i = 0; i < n; i++) {
    G[i] = 0;
  }
  vector<int> b;
  int a;
  for (int i = 0; i < n; i++) {
    cin >> a;
    b.push_back(a);
    G[a]++;
    for (int j = 2; j <= sqrt(a); j++) {
      if (!(a % j)) G[j]++;
    }
  }
  for (int i = 0; i < 10; i++) {
    cout << G[i] << endl;
  }
  int ans = gcd(b[0], b[1]);
  for (int i = 2; i < n; i++) {
    ans = gcd(b[i], ans);
  }
  if (ans != 1) {
    cout << "not coprime" << endl;
    return 0;
  } else {
    for (int j = 2; j <= sqrt(1000010); j++) {
      if (G[j] >= 2) {
        cout << "setwise coprime" << endl;
        return 0;
      }
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
