#include <bits/stdc++.h>
using namespace std;
const int maN = 1e6 + 5;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int n;
  cin >> n;
  vector<int> a;
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    a.push_back(x);
  }
  int pw = 1, sw = 1, ncp = 1;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (i != j) {
        if (gcd(a[i], a[j]) != 1) {
          pw = 0;
          break;
        }
      }
    }
    if (!pw) break;
  }
  int gcds = gcd(a[0], a[1]);
  for (int i = 2; i < n; ++i) {
    gcds = gcd(gcds, a[i]);
  }
  if (gcds != 1) sw = 0;
  if (pw)
    cout << "pairwise coprime";
  else if (sw)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
