#include <bits/stdc++.h>
using namespace std;
long long int n, k, m, t, a, b, l, r, temp1, temp2, s, x, y, temp, q, d,
    mod = 1e9 + 7, w, p, c;
long long int gcd(long long int a, long long int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long int hashm[1000005];
long long int spf[1000005];
void precalc() {
  spf[1] = 1;
  for (int i = 2; i <= 1000000; i++) {
    if (spf[i] == 0) {
      for (int j = i; j <= 1000000; j += i) {
        spf[j] = i;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  precalc();
  cin >> n;
  vector<long long int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    hashm[v[i]]++;
  }
  bool pairw = true, setwise = false;
  for (int i = 0; i < n; i++) {
    long long int temp = v[i];
    hashm[v[i]]--;
    set<long long int> dis;
    while (spf[temp] > 1) {
      dis.insert(spf[temp]);
      temp = temp / spf[temp];
    }
    for (auto x : dis) {
      long long int k = x;
      for (int j = x; j <= 1000000; j += x) {
        if (hashm[j] >= 1) {
          pairw = false;
        }
      }
    }
  }
  long long int temp = v[0];
  for (int i = 1; i < n; i++) {
    temp = gcd(temp, v[i]);
  }
  if (temp == 1) setwise = true;
  if (pairw) {
    cout << "pairwise coprime" << endl;
  } else if (setwise) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
