#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  vector<long long> v(n);
  long long i, j;
  set<long long> s;
  long long si = n;
  vector<long long> temp;
  bool one = 0;
  for (i = 0; i < n; i++) {
    cin >> v[i];
    if (v[i] == 1) {
      si--;
      one = 1;
      continue;
    }
    s.insert(v[i]);
  }
  if (s.size() == 0) {
    cout << "setwise coprime";
    return;
  }
  for (auto it = s.begin(); it != s.end(); it++) temp.push_back(*it);
  bool f = 1;
  bool t = 1;
  long long maxi = temp[temp.size() - 1];
  for (j = 2; j * j <= maxi; j++) {
    int count = 0;
    for (i = 0; i < temp.size(); i++) {
      if (temp[i] % j == 0) {
        count++;
        while (temp[i] % j == 0) temp[i] = temp[i] / j;
      }
    }
    if (count > 1) f = 0;
    if (count == temp.size()) t = 0;
    if (f == 0 && t == 0) break;
  }
  if (f == 1) {
    cout << "pairwise coprime";
    return;
  }
  if (t == 1 || one == 1) {
    cout << "setwise coprime";
    return;
  }
  cout << "not coprime";
  return;
}
int main() {
  int t = 1;
  while (t--) solve();
  return 0;
}
