#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void solve() {
  int n;
  cin >> n;
  vector<int> v(n);
  map<int, int> m;
  int max_ = 0;
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    max_ = max(max_, v[i]);
    m[v[i]]++;
  }
  sort(v.begin(), v.end());
  vector<int> gcdDp(n);
  gcdDp[n - 1] = v[n - 1];
  for (int i = n - 2; i >= 0; i--) {
    int num = gcd(v[i], gcdDp[i + 1]);
    gcdDp[i] = num;
  }
  bool flg = true;
  for (int i = 2; i <= sqrt(max_); i++) {
    int c = 0;
    for (int j = i; j <= max_; j += i) {
      if (m.find(j) != m.end()) {
        c++;
      }
      if (c > 1) {
        flg = false;
        break;
      }
    }
    if (c > 1) {
      flg = false;
      break;
    }
  }
  if (flg) {
    cout << "pairwise coprime";
    return;
  }
  if (gcdDp[0] == 1) {
    cout << "setwise coprime";
    return;
  }
  cout << "not coprime";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
