#include <bits/stdc++.h>
using namespace std;
int n, b[3000003], d[3000003], p[3000003], ans = 1, g = 0;
int gcd(int x, int y) {
  if (x > y) swap(x, y);
  if (x == 0) return y;
  return gcd(y % x, x);
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  ;
  cin >> n;
  vector<int> a(n);
  vector<int> c(3000003);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    c[a[i]]++;
  }
  bool pairwise = true;
  for (int i = 2; i < 3000003; i++) {
    int cnt = 0;
    for (int j = i; j < 3000003; j += i) {
      cnt += c[j];
    }
    if (cnt > 1) pairwise = false;
  }
  if (pairwise) {
    cout << "pairwise coprime\n";
    return 0;
  } else if (g == 1) {
    cout << "setwise coprime\n";
    return 0;
  }
  cout << "not coprime\n";
}
