#include <bits/stdc++.h>
using namespace std;
int n, b[3000003], d[3000003], p[3000003], ans = 1, g = 0;
int gcd(int x, int y) {
  if (x > y) swap(x, y);
  if (x == 0) return y;
  return gcd(y % x, x);
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  ;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    g = gcd(a[i], g);
    b[a[i]]++;
  }
  for (int i = 2; i * i <= 3000003; i++) {
    if (p[i]) continue;
    for (int j = i; j <= 3000003; j += i) {
      p[j] = 1;
      if (b[j]) {
        if (d[i] || b[j] > 1) ans = 0;
        d[i] = 1;
      }
    }
  }
  if (ans) {
    cout << "pairwise coprime\n";
    return 0;
  } else if (g == 1) {
    cout << "setwise coprime\n";
    return 0;
  }
  cout << "not coprime\n";
}
