#include <bits/stdc++.h>
using namespace std;
long long MAX = 100000000000;
long long MOD = 1000000007;
void solve() {
  long long n;
  cin >> n;
  ;
  vector<long long> v;
  map<long long, long long> m;
  for (long long i = (0); i < (n); i++) {
    long long in;
    cin >> in;
    ;
    v.push_back(in);
  }
  for (long long i = (0); i < (n); i++) {
    long long k = v[i];
    for (long long j = (2); j < (sqrt(k) + 1); j++) {
      if (k % j == 0) m[j]++;
      while (k % j == 0) {
        k /= j;
      }
    }
    if (k != 1) m[k]++;
  }
  long long f = 0, f1 = 0;
  for (auto i : m) {
    if (i.second == n) f = 1;
    if (i.second > 1) f1 = 1;
  }
  if (f == 1) {
    cout << "not coprime";
  } else if (f1 == 1) {
    cout << "setwise coprime";
  } else
    cout << "pairwise coprime";
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long test = 1;
  while (test--) {
    solve();
  }
}
