#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  while (b != 0) {
    if (a > b) {
      a = a - b;
    } else {
      b = b - a;
    }
  }
  return a;
}
int main() {
  int n;
  cin >> n;
  int a[n];
  int d = 0;
  int amax = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    d = gcd(d, a[i]);
    amax = max(amax, a[i]);
  }
  int factors[amax + 1];
  for (int i = 0; i <= amax; i++) {
    factors[i] = 0;
  }
  for (int i = 2; i <= amax; i++) {
    if (factors[i] != 0) {
      continue;
    }
    for (int j = 1; j <= amax; j++) {
      if (j * i > amax) {
        break;
      }
      if (factors[j * i] != 0) {
        continue;
      }
      factors[j * i] = i;
    }
  }
  map<int, set<int>> primes;
  for (int i = 0; i < n; i++) {
    while (a[i] > 1) {
      primes[i].insert(factors[a[i]]);
      a[i] /= factors[a[i]];
    }
  }
  map<int, int> count;
  for (int i = 0; i < n; i++) {
    for (int x : primes[i]) {
      count[x]++;
    }
  }
  bool pairwise = true;
  for (auto c : count) {
    pairwise &= c.second == 1;
  }
  if (pairwise) {
    cout << "pairwise coprime\n";
  } else if (d == 1) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
}
