#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const ll INF = 100000007;
const int MAX = 1000010;
bool p = true;
bool s = true;
vector<int> t(MAX);
bool is_prime(int n) {
  for (int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) return false;
  }
  return true;
}
void prime_factorize(int n) {
  for (int p = 2; p * p <= n; ++p) {
    if (n % p != 0) continue;
    while (n % p == 0) {
      n /= p;
    }
    t[p]++;
  }
  if (n != 1) {
    t[n]++;
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
    if (is_prime(a[i])) {
      t[a[i]]++;
    } else {
      prime_factorize(a[i]);
    }
  }
  for (int i = 0; i < (MAX); ++i) {
    if (t[i] == n) s = false;
    if (t[i] > 1) p = false;
  }
  if (p == true) {
    cout << "pairwise coprime" << endl;
  } else if (s) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
