#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
const int MAXN = 100;
const int INF = 1e9;
int gcd(int a, int b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
int cnt[1000100];
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int g = a[0];
  for (int i = 1; i < n; i++) g = gcd(g, a[i]);
  for (int i = 0; i < n; i++) cnt[a[i]] = 1;
  int f = 0;
  for (int i = 2; i < 1000100; i++) {
    int c = 0;
    for (int j = i; j < 1000100; j += i) {
      c += cnt[j];
    }
    if (c > 1) f = 1;
    if (f) break;
  }
  if (!f) {
    cout << "pairwise coprime\n";
  } else if (g == 1) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  solve();
  return 0;
}
