#include <bits/stdc++.h>

using namespace std;

const int maxm = 1e4 + 5;

int a[maxm], mf[maxm];
unordered_map <int, int> ump;
bool not_pairwise = false;

void init() {
  mf[1] = 1;
  for(int i = 2; i < maxm; i += 2) {
    mf[i] = 2;
  }
  for(int i = 3; i < maxm; i += 2) {
    if(!mf[i]) {
      mf[i] = i;
      for(long long j = 1ll * i * i; j < maxm; j += i) {
        mf[j] = i;
      }
    }
  }
}

void factorize(int x) {
  vector<int> a;
  while(x > 1) {
    a.push_back(mf[x]);
    x /= mf[x];
  }
  for(int y : a) {
    if(ump[y] == 1) {
      not_pairwise = true;
    }
  }
  for(int y : a) {
    ump[y] = 1;
  }
}

int main() {
  init();
  int n;
  cin >> n;
  int g = -1;
  for(int i = 0; i < n; i++) {
    cin >> a[i];
    if(g == -1) g = a[i];
    else g = __gcd(g, a[i]);
    factorize(a[i]);
  }
  if(!not_pairwise) cout << "pairwise coprime";
  else if(g == 1) cout << "setwise coprime";
  else cout << "not coprime";
}