#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long i, j, k, n, m;
  long long t;
  cin >> n;
  long long a[n];
  unordered_map<long long, long long> make_pair;
  long long fl = 0, f = 0;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    make_pair[a[i]]++;
    if (make_pair[a[i]] >= 2 && a[i] != 1) f = 1;
  }
  long long ans = a[0];
  for (i = 1; i < n; i++) {
    ans = gcd(a[i], ans);
  }
  long long prime[1000001];
  memset(prime, 0, sizeof(prime));
  long long count = 0;
  for (long long p = 2; p * p < 1000001; p++) {
    if (prime[p] == 0) {
      for (i = p * p; i < 1000001; i += p) {
        prime[i] = 1;
        if (make_pair[i]) {
          count++;
        }
      }
      if (count >= 1) break;
    }
  }
  if (ans != 1) {
    cout << "not coprime";
  } else if (count >= 1 || f) {
    cout << "setwise coprime";
  } else {
    cout << "pairwise coprime";
  }
}
