#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
int gcd(int n, int m) {
  if (n < m) swap(n, m);
  if (m == 0) return 0;
  while (m > 0) {
    int res = n % m;
    n = m;
    m = res;
  }
  return n;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n, 0);
  vector<int> c(1000005, 0);
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
    c[a[i]]++;
  }
  bool par = true;
  for (int i = 2; i <= 1000000; i++) {
    int cnt = 0;
    for (int j = i; j <= 1000000; j += i) {
      cnt += c[j];
    }
    if (cnt > 1) par = 0;
  }
  if (par) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int g = 0;
  for (int i = 0; i < (n); i++) g = gcd(g, a[i]);
  if (g == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
