#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int MAX = 1e5 + 7;
int gcd(int a, int b) { return (b ? gcd(b, a % b) : a); }
int primes[100005];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < (int)n; i++) cin >> v[i];
  int g = v[0];
  for (int i = 0; i < (int)n; i++) {
    int aux = v[i];
    for (int j = 2; j * j <= aux; j++) {
      if (aux % j == 0) {
        primes[j]++;
        while (aux % j == 0) aux /= j;
      }
    }
    if (aux > 1) primes[aux]++;
    g = gcd(g, v[i]);
  }
  bool pairwise = true;
  for (int i = 0; i < (int)100005; i++) {
    if (primes[i] > 1) pairwise = false;
  }
  if (pairwise)
    cout << "pairwise coprime\n";
  else if (g == 1)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
  return 0;
}
