#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  while (b != 0) {
    int t = b;
    b = a % b;
    a = t;
  }
  return a;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int MAXN = 1000100, n, i, j, k, g, ct;
  bool pairwise, setwise;
  cin >> n;
  vector<int> a(n);
  vector<bool> used(MAXN, false);
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (i == 0)
      g = a[i];
    else
      g = gcd(g, a[i]);
    used[a[i]] = true;
  }
  pairwise = true;
  for (i = 2; i < MAXN; i++) {
    ct = 0;
    for (j = i; j < MAXN; j += i) ct += used[j];
    if (ct > 1) pairwise = false;
  }
  if (pairwise)
    cout << "pairwise coprime\n";
  else if (g == 1)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
  return 0;
}
