#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) {
  if (x % y == 0) return y;
  return gcd(y, x % y);
}
int lcm(int x, int y) { return x / gcd(x, y) * y; }
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int A = 1000005;
  vector<bool> seen(A, true);
  seen[0] = seen[1] = false;
  vector<int> prime(0);
  for (int i = 2; i < A; i++) {
    if (!seen[i]) continue;
    for (int p = i + i; p < A; p += p) {
      seen[p] = false;
    }
  }
  for (int i = 2; i < A; i++) {
    if (seen[i]) prime.push_back(i);
  }
  bool pairwise = true;
  vector<bool> paircheck(prime.size(), false);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < prime.size(); j++) {
      if (a[i] % prime[j] == 0) {
        if (paircheck[j])
          pairwise = false;
        else
          paircheck[j] = true;
      }
    }
    if (!pairwise) break;
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int g = 0;
  for (int i = 0; i < n; i++) {
    g = gcd(g, a[i]);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
