#include <bits/stdc++.h>
using ll = long long;
using namespace std;
int gcd(int a, int b) {
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  int len = 1000000 + 1;
  vector<int> a(n), d(len);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    d[a[i]]++;
  }
  bool ok = true;
  for (int i = 2; i < len; i++) {
    int cnt = 0;
    for (int j = i; j < len; j += i) cnt += d[j];
    if (cnt > 1) {
      ok = false;
      break;
    }
    if (!ok) break;
  }
  if (ok) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int g = a[0];
  for (int i = 0; i < n - 1; i++) g = gcd(g, a[i + 1]);
  if (g == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "non coprime" << endl;
}
