#include <bits/stdc++.h>
using namespace std;
long long n;
long long a[1000005];
long long prime[1000005];
bool used[1000005];
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main(void) {
  ios::sync_with_stdio(0);
  cin.tie(0);
  for (int i = 2; i < 1005; i++) {
    if (prime[i]) continue;
    for (int j = 2 * i; j < 1000005; j += i) prime[j] = i;
  }
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  long long g = 0;
  for (int i = 1; i <= n; i++) g = gcd(g, a[i]);
  if (g > 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    long long v = a[i];
    if (v == 1) continue;
    while (prime[v]) {
      if (used[prime[v]]) {
        cout << "setwise coprime" << endl;
        return 0;
      }
      used[prime[v]] = true;
      long long p = prime[v];
      while (v % p == 0) v /= p;
    }
    if (used[v]) {
      cout << "setwise coprime" << endl;
      return 0;
    }
    used[v] = true;
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
