#include <bits/stdc++.h>
using namespace std;
inline int gcd(int a, int b) { return b > 0 ? gcd(b, a % b) : a; }
const int maxn = 1E6 + 5;
int prime[maxn], sz;
bool vis[maxn];
void get_prime() {
  vis[1] = 1;
  for (int i = 2; i <= maxn; i++) {
    if (!vis[i]) prime[++sz] = i;
    for (int j = 1; i * prime[j] <= maxn && j <= sz; j++) {
      vis[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
    }
  }
}
int a[maxn], n, ans;
int main() {
  std::ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  ;
  get_prime();
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (i == 1)
      ans = a[i];
    else
      ans = gcd(ans, a[i]);
  }
  if (ans != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  map<int, int> ma;
  int flag = 1;
  for (int i = 1; i <= n; i++) {
    if (a[i] == 1) continue;
    for (int j = 1; prime[j] * prime[j] <= a[i]; j++) {
      if (a[i] % prime[j] == 0) {
        if (ma[prime[j]] > 0) {
          flag = 0;
          break;
        }
        while (a[i] % prime[j] == 0) a[i] /= prime[j];
        ma[prime[j]]++;
        if (a[i] != 1 && ma[a[i]] > 0) {
          flag = 0;
          break;
        }
        if (a[i] != 1 && ma[a[i]] == 0) ma[a[i]]++;
      }
    }
    if (flag == 0) break;
  }
  if (flag)
    cout << "pairwise coprime" << endl;
  else
    cout << "setwise coprime" << endl;
  return 0;
}
