#include <bits/stdc++.h>
using namespace std;
bool vis[1000004];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, i, j, k, cnt = 0, mx = -1, cnt1 = 0;
  cin >> n;
  int a[n];
  map<int, int> m;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 1) {
      cnt1++;
    }
    mx = max(a[i], mx);
  }
  for (i = 0; i < n; i++) {
    if (a[i] % 2 == 0) {
      vis[a[i]] = true;
      m[2]++;
      ;
    }
  }
  for (i = 3; i <= 1000; i += 2) {
    if (i > mx) {
      break;
    }
    for (j = 0; j < n; j++) {
      if (!vis[a[j]] && a[j] % i == 0) {
        vis[a[j]] = true;
        m[i]++;
      }
    }
  }
  if (cnt1 == 0) {
    if (m.size() == n) {
      cout << "pairwise coprime" << endl;
    } else if (m.size() > 1) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  } else {
    if (m.size() == (n - cnt1)) {
      cout << "pairwise coprime" << endl;
    } else {
      cout << "setwise coprime" << endl;
    }
  }
}
