#include <bits/stdc++.h>
using namespace std;
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
long long lcm(long long x, long long y) { return x / gcd(x, y) * y; }
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  vector<long long> b;
  vector<long long> c;
  bool flag_1 = false;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 1) flag_1 = true;
  }
  sort(a.begin(), a.end());
  for (int i = 0; i < n; i++) {
    if (a[i] == 1) continue;
    b.push_back(a[i]);
  }
  long long bb = b.size();
  if (bb == 0) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  c.push_back(b[0]);
  for (long long i = 1; i < bb; i++) {
    if (b[i - 1] != b[i]) {
      c.push_back(b[i]);
    }
  }
  long long cc = c.size();
  if (cc < 10005 && cc == bb) {
    bool flag = true;
    for (long long i = 0; i < cc; i++) {
      for (long long j = i + 1; j < cc; j++) {
        if (gcd(c[i], c[j]) != 1) flag = false;
      }
    }
    if (flag) {
      cout << "pairwise coprime" << endl;
      return 0;
    }
  }
  if (flag_1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  long long now_gcd = c[0];
  for (long long i = 1; i < cc; i++) {
    now_gcd = gcd(now_gcd, c[i]);
  }
  if (now_gcd == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  } else {
    cout << "not coprime" << endl;
    return 0;
  }
  return 0;
}
