#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int& ai : a) {
    cin >> ai;
  }
  map<int, int> count;
  for (int i = 0; i < n; ++i) {
    int ai = a[i];
    for (int k = 2; k <= ai; ++k) {
      if (ai % k == 0) {
        ++count[k];
      }
      while (ai % k == 0) {
        ai /= k;
      }
    }
  }
  bool p = true;
  for (pair<int, int> c : count) {
    if (c.second != 1) {
      p = false;
      break;
    }
  }
  if (p) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int g = gcd(a[0], a[1]);
  for (int i = 2; i < n; ++i) {
    g = gcd(g, a[i]);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime";
  return 0;
}
