#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int m = 0;
  unordered_map<int, int> a;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    a[x]++;
    m = max(m, x);
  }
  if (a.size() != n) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  bool flag_pair = true;
  bool flag_all = true;
  for (int i = 2; i <= m; i++) {
    int x = 0;
    for (int j = i; j <= m; j += i) {
      if (a[j]) {
        x++;
      }
    }
    if (x > 1) {
      flag_pair = false;
    }
    if (x == n) {
      flag_all = false;
    }
  }
  if (flag_pair) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (flag_all) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
