#include <bits/stdc++.h>
using namespace std;
using P = pair<int, int>;
bool is_prime(int n) {
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return n != 1;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main(void) {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  map<int, int> mp;
  int flag_pair = 1;
  for (int i = 0; i < n; i++) {
    int v = a[i];
    if (is_prime(v)) {
      mp[v]++;
      if (mp[v] > 1) {
        flag_pair = 0;
      }
    }
    for (int j = 2; j * j <= v + 10; j++) {
      if (v % j == 0) {
        mp[j]++;
        if (mp[j] > 1) {
          flag_pair = 0;
        }
        while (v % j == 0) {
          v /= j;
        }
      }
    }
  }
  int flag_set = 0;
  int now = a[0];
  for (int i = 1; i < n; i++) {
    now = gcd(now, a[i]);
  }
  if (now == 1) flag_set = 1;
  if (flag_pair)
    cout << "pairwise coprime" << endl;
  else if (flag_set)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
