#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
int a[maxn];
int pri[maxn], vis[maxn];
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
bool work() {
  int f1 = 1;
  for (int i = 0; i < maxn; i++) pri[i] = 1;
  pri[1] = pri[0] = 0;
  for (int i = 2; i < maxn; i++) {
    if (pri[i]) {
      int f2 = 0;
      if (vis[i]) f2 = 1;
      for (int j = i * 2; j < maxn; j += i) {
        pri[j] = 0;
        if (f2 && vis[j]) f1 = 0;
        if (vis[j]) f2 = 1;
        if (!f1) return false;
      }
    }
  }
  return true;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int mx = 0, maxx = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    vis[a[i]]++;
    mx = max(vis[a[i]], mx);
    if (a[i] != 1) maxx = max(maxx, a[i]);
  }
  if (maxx == 1) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (mx <= 1) {
    if (work()) {
      cout << "pairwise coprime" << endl;
      return 0;
    }
  }
  int ans = a[1];
  for (int i = 1; i <= n; i++) ans = gcd(ans, a[i]);
  if (ans == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
