#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
set<long long> st[1000001];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  long long sp = a[0];
  for (int i = 0; i < n; ++i) {
    sp = gcd(sp, a[i]);
  }
  bool setwise = (sp == 1ll);
  for (int i = 0; i < n; ++i) {
    long long val = a[i];
    for (long long j = 2; j * j <= val; ++j) {
      while (val % j == 0) {
        st[j].insert(i);
        val /= j;
      }
    }
    if (val != 1ll) {
      st[val].insert(i);
    }
  }
  bool pairwise = true;
  for (int i = 2; i <= 1000000; ++i) {
    if (1ll < st[i].size()) {
      pairwise = false;
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << '\n';
  } else if (setwise) {
    cout << "setwise coprime" << '\n';
  } else {
    cout << "not coprime" << '\n';
  }
  return 0;
}
