#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
int n;
string ans;
bool pc = true;
bool sc = true;
int main() {
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
  }
  vector<bool> p(1001, true);
  p[0] = false;
  p[1] = false;
  for (int i = 0; i < (1001); ++i) {
    if (p[i]) {
      for (int j = 2 * i; j < 1001; j += i) {
        p[j] = false;
      }
    }
  }
  vector<vector<int>> np(n, vector<int>(1001, 0));
  for (int i = 0; i < (1001); ++i) {
    if (!p[i]) continue;
    for (int j = 0; j < (n); ++j) {
      while (a[j] % i == 0) {
        np[j][i] = 1;
        a[j] /= i;
      }
    }
  }
  sort(a.begin(), a.end());
  int same = 0;
  for (int i = 0; i < (n - 1); ++i) {
    if (a[i] != 1 && a[i] == a[i + 1]) same++;
  }
  if (same == n - 1) sc = false;
  if (same > 0) pc = false;
  vector<int> ev(1001, 0);
  for (int i = 0; i < (1001); ++i) {
    for (int j = 0; j < (n); ++j) {
      ev[i] += np[j][i];
    }
  }
  for (int i = 0; i < (1001); ++i) {
    if (ev[i] > 1) pc = false;
    if (ev[i] == n) sc = false;
  }
  if (pc) {
    ans = "pairwise coprime";
  } else {
    if (sc)
      ans = "setwise coprime";
    else
      ans = "not coprime";
  }
  cout << ans << endl;
  return 0;
}
