#include <bits/stdc++.h>
using namespace std;
void sieve(vector<bool> &x, int k) {
  int i = 2;
  while (i < k) {
    if (x[i] == true) {
      int j = 2;
      while ((i * j) <= k) {
        x[i * j] = false;
        j++;
      }
    }
    i++;
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> y;
  int m = 0;
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    y.push_back(t);
    m = max(m, t);
  }
  vector<bool> x(m + 1, true);
  sieve(x, m);
  vector<int> pr;
  int ss = x.size();
  for (int i = 2; i < ss; i++) {
    if (x[i] == true) {
      pr.push_back(i);
    }
  }
  int e = pr.size();
  int flag = 0;
  vector<set<int>> s;
  map<int, int> w;
  for (int i = 0; i < n; i++) {
    set<int> r;
    int q = y[i];
    int j = 0;
    while (j < e && q > 0) {
      while (q % pr[j] == 0 && q > 0) {
        q = q / pr[j];
        r.emplace(pr[j]);
      }
      j++;
    }
    s.push_back(r);
  }
  int count = 0;
  for (int i = 0; i < s.size(); i++) {
    for (auto t : s[i]) {
      w[t]++;
    }
  }
  int u = s.size();
  for (auto t : w) {
    if (t.second == u) {
      flag = 2;
      break;
    } else if (t.second > 1) {
      flag = 1;
    }
  }
  if (flag == 0) {
    cout << "pairwise coprime" << endl;
  } else if (flag == 1) {
    cout << "setwise coprime" << endl;
  } else if (flag == 2) {
    cout << "not coprime" << endl;
  }
}
