#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using P = pair<int, int>;
vector<pair<ll, int>> factorize(ll n) {
  vector<pair<ll, int>> ans;
  if (n == 1) return ans;
  for (ll i = 2; i * i <= n; i++) {
    int cnt = 0;
    while (n % i == 0) {
      cnt++;
      n /= i;
    }
    if (cnt) ans.emplace_back(i, cnt);
  }
  if (n != 1) ans.emplace_back(n, 1);
  return ans;
}
void Main() {
  int n;
  cin >> n;
  map<int, int> cnt;
  for (int(i) = 0; (i) < (n); (i)++) {
    int a;
    cin >> a;
    for (auto [p, e] : factorize(a)) {
      cnt[p]++;
    }
  }
  int mx = 0;
  for (auto [k, v] : cnt) {
    mx = max(mx, v);
  }
  if (mx == n)
    cout << "not coprime" << endl;
  else if (mx == 1)
    cout << "pairwise coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return;
}
int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  Main();
  return 0;
}
