#include <bits/stdc++.h>
using namespace std;
void print(const vector<long long int> &a) {
  for (int i = 0; i < a.size(); i++) cout << a[i] << " ";
  cout << "\n";
}
void solve() {
  int n;
  cin >> n;
  vector<long long int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<int> b(1000001);
  bool flag = true;
  for (int i = 0; i < n; i++) {
    if (a[i] == 1) b[1]++;
  }
  for (int i = 0; i < n; i++) {
    if (a[i] % 2 == 0) b[2]++;
    while (a[i] % 2 == 0) a[i] /= 2;
    for (int j = 3; j * j <= a[i]; j += 2) {
      if (a[i] % j == 0) {
        flag = false;
        b[j]++;
        while (a[i] % j != 0) a[i] /= j;
      }
    }
    if (flag) {
      b[a[i]]++;
    }
  }
  if (b[1] == n) {
    cout << "pairwise coprime";
    return;
  }
  if (b[1] > 0) {
    cout << "setwise coprime";
    return;
  }
  int count;
  for (int i = 1; i < 1000001; i++) {
    if (b[i] == n) {
      cout << "not coprime";
      return;
    }
  }
  cout << "setwise coprime";
}
int main() { solve(); }
