#include <bits/stdc++.h>
using namespace std;
long long int mp[1000009];
long long int cnt[1000009];
vector<long long int> prime_check[1000009];
long long int ase_naki_nai[1000009];
long long int arra[1000009];
void seive(long long int n) {
  long long int i, j, k, l, p, q, r, s, t, u, v;
  for (i = 2; i <= n; i++) {
    if (mp[i] == 0) {
      for (j = i + i; j <= n; j = j + i) mp[j] = 1;
    }
  }
}
int main() {
  long long int i, j, k, p, q, r, s, t, u = 1, v, w, x, y, z, n, m, top = 0;
  p = 1000009;
  seive(p);
  cin >> n;
  for (i = 0; i < n; i++) {
    scanf("%lld", &arra[i]);
  }
  for (i = 0; i < n; i++) {
    if (mp[arra[i]] == 0) {
      prime_check[i].push_back(arra[i]);
      continue;
    }
    m = arra[i];
    for (j = 2; j <= m; j++) {
      if (m % j == 0) {
        while (m % j == 0) m = m / j;
        prime_check[i].push_back(j);
        if (mp[m] == 0 && m > 1) {
          prime_check[i].push_back(m);
          m = 1;
          break;
        }
      }
    }
    if (m > 1) prime_check[i].push_back(m);
  }
  for (i = 0; i < n; i++) {
    x = arra[i];
    y = prime_check[i].size();
    for (j = 0; j < y; j++) {
      ase_naki_nai[prime_check[i][j]]++;
      if (ase_naki_nai[prime_check[i][j]] > 1) {
        u = -1;
      } else if (ase_naki_nai[prime_check[i][j]] == n)
        top = 1;
    }
  }
  if (u == 1) {
    cout << "pairwise coprime" << '\n';
  } else if (u == -1) {
    if (top == 1)
      cout << "no coprime" << '\n';
    else
      cout << "setwise coprime" << '\n';
  }
}
