#include <bits/stdc++.h>
using namespace std;
vector<int> isprime(1000009, -1);
void preprocess() {
  for (int i = 2; i < 1000009; i++) {
    if (isprime[i] == -1) {
      isprime[i] = i;
      for (int j = i * i; j < 1000009; j += i) {
        isprime[j] = i;
      }
    }
  }
}
int main() {
  int n;
  cin >> n;
  int a[n];
  preprocess();
  unordered_map<int, int> hash;
  int nax = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    unordered_set<int> temp;
    while (a[i] != 1) {
      temp.insert(isprime[a[i]]);
      a[i] /= isprime[a[i]];
    }
    for (auto x : temp) {
      hash[x]++;
      nax = max(nax, hash[x]);
    }
  }
  if (nax == 1)
    cout << "pairwise coprime" << endl;
  else if (nax < n)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
