#include <bits/stdc++.h>
using namespace std;
int INF = INT_MAX;
long long mod = 1000000007;
int gcd(int a, int b) {
  if (b == 0) return a;
  a %= b;
  return gcd(b, a);
}
void solve() {
  int n;
  cin >> n;
  vector<int> have(1000000 + 10);
  int g = 0;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    have[x]++;
    if (i == 0)
      g = x;
    else
      g = gcd(g, x);
  }
  if (g != 1) {
    cout << "not comprime\n";
    return;
  }
  vector<bool> done(1000000 + 10);
  bool da = true;
  for (int mul = 2; mul <= 1000000; mul++) {
    int cnt = 0;
    int now = mul;
    if (done[now]) continue;
    while (now <= 1000000) {
      done[now] = true;
      cnt += have[now];
      now += mul;
    }
    if (cnt > 1) da = false;
  }
  if (da)
    cout << "pairwise coprime\n";
  else
    cout << "setwise coprime\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int q = 1;
  while (q--) solve();
}
