#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vs = vector<string>;
using vvi = vector<vector<int>>;
using P = pair<int, int>;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  int n;
  cin >> n;
  vi a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  set<int> ds;
  for (int i = 0; i < (int)(n); i++)
    for (int j = 0; j < (int)(n); j++) {
      if (i >= j) continue;
      int d = gcd(a[i], a[j]);
      if (d != 1) ds.insert(d);
    }
  if (ds.empty()) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  bool not_coprime = false;
  for (int x : ds) {
    for (int i = 0; i < (int)(n); i++) {
      if (a[i] % x != 0) break;
      if (i == n - 1) not_coprime = true;
    }
    if (not_coprime) break;
  }
  if (!not_coprime)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
