#include <bits/stdc++.h>
using namespace std;
int spf[1000005];
void sieve() {
  spf[1] = 1;
  for (int i = 2; i < 1000005; i++) spf[i] = i;
  for (int i = 4; i < 1000005; i += 2) spf[i] = 2;
  for (int i = 3; i * i < 1000005; i++) {
    if (spf[i] == i) {
      for (int j = i * i; j < 1000005; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
set<int> gf(int x) {
  set<int> ret;
  while (x != 1) {
    ret.insert(spf[x]);
    x = x / spf[x];
  }
  return ret;
}
void solve() {
  int n;
  cin >> n;
  vector<int> v(n);
  int mx = 0;
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    mx = max(mx, v[i]);
  }
  vector<set<int> > z;
  map<int, int> m;
  for (auto x : v) {
    set<int> s = gf(x);
    z.push_back(s);
  }
  int g = 0;
  for (auto &x : z) {
    for (auto &xx : x) {
      m[xx]++;
      g = max(g, m[xx]);
    }
  }
  if (g == 1) {
    cout << "pairwise coprime" << endl;
  } else if (g < n) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  sieve();
  t = 1;
  while (t--) solve();
}
