#include <bits/stdc++.h>
using namespace std;
long long INF = 1e18;
long long mod = 1e9 + 7;
long long GCD(long long a, long long b) {
  if (a < 0) a = -a;
  if (b < 0) b = -b;
  if (b == 0)
    return a;
  else
    return GCD(b, a % b);
}
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  long long setwise = a[0];
  for (int i = 1; i <= n - 1; i++) {
    setwise = GCD(a[i], setwise);
  }
  set<int> tree;
  bool p = true;
  for (int i = 0; i < n; i++) {
    int k = 1;
    while (a[i] > 1) {
      k++;
      if (a[i] % k == 0) {
        if (tree.find(k) != tree.end()) {
          p = false;
          break;
        } else {
          tree.insert(k);
        }
        while (a[i] % k == 0) a[i] /= k;
      }
    }
  }
  if (setwise != 1) {
    cout << "not coprime" << endl;
  } else if (p && setwise == 1) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
