#include <bits/stdc++.h>
using namespace std;
int main() {
  int lpf[1000001];
  lpf[1] = 1;
  for (int i = 2; i < 1000001; i++) lpf[i] = i;
  for (int i = 2; i < 1000001; i++) {
    if (lpf[i] != i) continue;
    for (int j = i + i; j < 1000001; j += i) {
      lpf[j] = min(lpf[j], i);
    }
  }
  int n;
  cin >> n;
  unordered_map<int, int> mp;
  bool all = 1;
  for (int i = 0; i < n; i++) {
    int ele;
    cin >> ele;
    while (ele != 1) {
      if (mp.count(lpf[ele]) == 1) all = 0;
      mp[lpf[ele]]++;
      while (ele != 1 && ele % lpf[ele] == 0) ele = ele / lpf[ele];
    }
  }
  if (all) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  all = 1;
  for (pair<int, int> k : mp) {
    if (k.first != 1 && k.second == n) {
      all = 0;
      break;
    }
  }
  if (all)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
