#include <bits/stdc++.h>
const int MAX = 1e6 + 10;
const int modn = 1e9 + 7;
using namespace std;
int n, a[MAX];
bool vis[MAX];
vector<int> prime;
int cnt[MAX];
int mp[MAX];
void prepare() {
  bool is = true;
  for (int i = 2; i * i <= MAX; i++) {
    int ans = 0;
    if (!vis[i]) {
      for (int j = i; j < MAX; j += i) {
        if (cnt[j]) ans += cnt[j];
      }
      if (ans > 1) {
        is = false;
      }
      if (ans == n) {
        cout << "not coprime\n";
        return;
      }
    }
  }
  if (is)
    cout << "pairwise coprime";
  else
    cout << "setwise coprime";
}
void solve() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    cnt[a[i]]++;
  }
  prepare();
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int _ = 1;
  while (_--) {
    solve();
  }
  return 0;
}
