#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int maxm = 1e6;
int sv[maxm + 1];
void sieve() {
  memset(sv, 0, sizeof(sv));
  sv[1] = 1;
  for (int i = 1; i <= maxm; i++) {
    sv[i] = i;
  }
  for (int i = 2; i * i <= maxm; i++) {
    if (sv[i] != i) continue;
    for (int j = i * i; j <= maxm; j += i) {
      sv[j] = i;
    }
  }
  for (int i = 1; i <= maxm; i++) {
    cout << i << " " << sv[i] << "\n";
  }
}
set<int> factors(int num) {
  set<int> ret;
  while (num != 1) {
    int sp = sv[num];
    ret.insert(sp);
    num /= sp;
  }
  return ret;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int pairw(int *arr, int n) {
  set<int> fac;
  for (int i = 0; i < n; i++) {
    auto it = factors(arr[i]);
    for (const auto &v : it) {
      if (fac.find(v) != fac.end()) {
        return 0;
      } else {
        fac.insert(v);
      }
    }
  }
  return 1;
}
int setw(int *arr, int n) {
  int g = arr[0];
  for (int i = 1; i < n; i++) {
    g = gcd(arr[i], g);
  }
  return (g == 1);
}
void solve() {
  int n;
  cin >> n;
  int a[n];
  sieve();
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int ans1 = setw(a, n);
  int ans2 = pairw(a, n);
  if (ans2)
    cout << "pairwise coprime\n";
  else if (ans1)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  ;
  solve();
  return 0;
}
