#include <bits/stdc++.h>
using namespace std;
bool prime[1005];
vector<int> pr;
int n;
set<int> s;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  for (int p = 2; p <= 1005; p++) {
    if (!prime[p]) {
      for (int i = p * p; i <= 1005; i += p) prime[i] = 1;
    }
  }
  for (int p = 2; p <= 1005; p++)
    if (!prime[p]) pr.push_back(p);
  int ps = pr.size();
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    int j = 0;
    while (j < ps && a[i] % pr[j]) j++;
    if (j < ps)
      s.insert(pr[j]);
    else
      s.insert(a[i]);
  }
  if (s.size() == 1)
    cout << "not coprime";
  else if (s.size() == n)
    cout << "pairwise coprime";
  else
    cout << "setwise coprime";
}
