#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
const int N = (int)1e6 + 7;
int devisors_cnt[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int g = 0;
  for (int i = 0; i < n; ++i) {
    g = gcd(g, a[i]);
  }
  if (g != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    devisors_cnt[a[i]]++;
    for (int j = 2; j * j <= a[i]; ++j) {
      if (a[i] % j == 0) {
        devisors_cnt[j]++;
        if (devisors_cnt[j] > 1) {
          cout << "setwise coprime" << endl;
          return 0;
        }
        if (j * j != a[i]) {
          devisors_cnt[a[i] / j]++;
          if (devisors_cnt[a[i] / j]) {
            cout << "setwise coprime" << endl;
            return 0;
          }
        }
      }
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
