#include <bits/stdc++.h>
using namespace std;
vector<int> list;
bool isPrimes(int a, int b) {
  int c = pow(min(a, b), 0.5);
  if (c == 1) return true;
  for (int i = 2; i <= c; ++i) {
    if (a % i == 0 && b % i == 0) {
      if (find(list.begin(), list.end(), i) == list.end()) {
        list.push_back(i);
      }
      return false;
    }
  }
  return true;
}
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  bool r1 = true;
  for (int i = 0; i < n - 1; ++i) {
    for (int j = i + 1; j < n; ++j) {
      r1 &= isPrimes(a[i], a[j]);
    }
  }
  if (r1) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  for (const int v : list) {
    bool r2 = true;
    for (int k = 0; k < n; ++k) {
      r2 &= a[k] % v == 0;
    }
    if (r2) {
      cout << "not coprime" << endl;
      return 0;
    }
  }
  cout << "setwise coprime" << endl;
  return 0;
}
