#include <bits/stdc++.h>
using namespace std;
void solve() {
  bitset<(long long)(1e4 + 10)> b;
  vector<long long> pr;
  for (long long i = 2; i < (long long)(1e4 + 10); i++) {
    if (!b[i]) {
      pr.push_back(i);
      for (long long j = i * i; j < (long long)(1e4 + 10); j += i) b[j] = true;
    }
  }
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long &i : a) cin >> i;
  map<long long, long long> cnt;
  for (long long i : a) {
    for (long long j : pr) {
      if (i % j == 0) {
        cnt[j]++;
        while (i % j == 0) i /= j;
      }
      if (i < (long long)(1e4 + 10) and !b[i]) {
        if (i != 1) cnt[i]++;
        break;
      }
    }
  }
  long long hasOne = 0, hasAll = 0;
  for (auto it : cnt) {
    if (it.second == 1)
      hasOne++;
    else if (it.second == n)
      hasAll++;
  }
  if (hasOne == n)
    cout << "pairwise coprime" << endl;
  else if (!hasAll)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr), cin.tie(nullptr);
  long long t_c = 1;
  while (t_c--) solve();
}
