#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  vector<bool> v(1e6 + 10, false);
  set<int> se;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    se.insert(a);
    v[a] = true;
  }
  int x = *se.begin();
  for (int cand : se) x = gcd(x, cand);
  if (se.size() != n) {
    if (x == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
    return 0;
  }
  vector<bool> prime(1e6 + 10, true);
  set<int> pr;
  for (int i = 2; i <= 1e6; i++) {
    if (prime[i]) {
      for (int j = i; j <= 1e6; j += i) {
        prime[j] = false;
      }
    }
    pr.insert(i);
  }
  for (int pri : pr) {
    int cnt = 0;
    for (int i = pri; i <= 1e6; i += pri) {
      if (v[i]) cnt++;
    }
    if (cnt > 1) {
      if (x == 1)
        cout << "setwise coprime" << endl;
      else
        cout << "not coprime" << endl;
      return 0;
    }
  }
  cout << "pairwise coprime" << endl;
}
