#include <bits/stdc++.h>
using namespace std;
int spf[1000001];
int gcd1(int a, int b) {
  if (b == 0) return a;
  return gcd1(b, a % b);
}
void sieve() {
  spf[1] = 1;
  for (int i = 2; i < 1000001; i++) spf[i] = i;
  for (int i = 4; i < 1000001; i += 2) spf[i] = 2;
  for (int i = 3; i * i < 1000001; i++) {
    if (spf[i] == i) {
      for (int j = i * i; j < 1000001; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
vector<int> getFactorization(int x) {
  vector<int> ret;
  while (x != 1) {
    ret.push_back(spf[x]);
    x = x / spf[x];
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m, i, j, k;
  cin >> n;
  sieve();
  vector<int> a(n);
  for (i = 0; i < n; i++) cin >> a[i];
  vector<int> mark(n + 1, 0);
  int flag = 1;
  for (i = 0; i < n && flag; i++) {
    vector<int> p = getFactorization(a[i]);
    if (p.size()) {
      vector<int>::iterator ip;
      ip = std::unique(p.begin(), p.end());
      p.resize(std::distance(p.begin(), ip));
      for (j = 0; j < p.size() && flag; j++) {
        if (mark[p[j]] == 0)
          mark[p[j]] = 1;
        else {
          flag = 0;
        }
      }
    }
  }
  if (flag == 1)
    cout << "pairwise coprime" << endl;
  else {
    int gcd = a[0];
    for (i = 1; i < n; i++) {
      gcd = gcd1(gcd, a[i]);
    }
    if (gcd == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
  return 0;
}
