#include <bits/stdc++.h>
using namespace std;
void debug() {}
int main() {
  debug();
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  unordered_map<int, int> s;
  bool set = true, pair = true;
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    for (int j = 1; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        s[j]++;
        if (j * j != a[i]) s[a[i] / j]++;
      }
    }
  }
  for (auto i : s) {
    if (i.second == n && i.first != 1) {
      set = false;
    }
    if (i.second > 1 && i.first != 1) {
      pair = false;
    }
  }
  if (pair) {
    cout << "pairwise coprime" << endl;
  } else if (set) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
