#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a * b == 0) {
    return a + b;
  }
  return gcd(b, a % b);
}
int used[1000400];
void solve() {
  int n, g = 0;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    g = gcd(g, a[i]);
  }
  bool ok = true;
  for (int i = 0; i < n; i++) {
    int t = a[i];
    int k = 2;
    while (t > 1) {
      if (t % k == 0 && used[k] > 0) {
        ok = false;
        break;
      }
      while (t % k == 0) {
        used[k]++;
        t /= k;
      }
      k++;
    }
    if (!ok) break;
  }
  if (ok)
    cout << "pairwise coprime";
  else if (g == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t = 1;
  for (int i = 1; i <= t; i++) {
    solve();
  }
}
