#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int a[N];
int b[N];
int s[N];
int vis[N];
map<int, int> mp;
const int maxn = 1e6 + 10;
int prime[maxn];
bool sf[maxn];
void sushu() {
  int num = 0;
  memset(sf, true, sizeof(sf));
  for (int i = 2; i <= maxn; i++) {
    if (sf[i]) prime[++num] = i;
    for (int j = 1; j <= num; j++) {
      if (i * prime[j] > maxn) break;
      sf[i * prime[j]] = false;
      if (i % prime[j] == 0) break;
    }
  }
  sf[1] = false;
  sf[0] = false;
}
int gcd(int x, int y) {
  if (!y) return x;
  return gcd(y, x % y);
}
int main() {
  memset(vis, 0, sizeof(vis));
  sushu();
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) b[i] = a[i];
  memset(s, 0, sizeof(s));
  int flag = 0;
  for (int i = 1; i <= n; i++) {
    if (flag) break;
    for (int j = 1;; j++) {
      if (prime[j] * prime[j] > a[i]) break;
      if (sf[a[i]]) {
        mp[a[i]] = 1;
        break;
      }
      if (a[i] % prime[j] == 0) {
        if (mp[prime[j]]) {
          flag = 1;
          break;
        }
        mp[prime[j]] = 1;
        while (a[i] % prime[j] == 0) {
          a[i] /= prime[j];
        }
      }
      if (a[i] == 1) break;
    }
  }
  if (flag == 0) {
    cout << "pairwise coprime" << endl;
  } else {
    for (int i = 1; i <= n; i++) a[i] = b[i];
    int ans = a[1];
    for (int i = 2; i <= n; i++) {
      ans = gcd(ans, a[i]);
    }
    if (ans == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
}
