#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
const long long mod = 1e9 + 7;
const long long mod1 = 998244353;
const long long big = 1e18;
const double PI = 2 * asin(1);
int main() {
  int N;
  cin >> N;
  long long A[N];
  for (int i = 0; i < N; ++i) cin >> A[i];
  map<int, int> amap;
  map<int, int> bmap[N];
  bool pairwise = true;
  vector<long long> arr;
  for (int i = 0; i < N; ++i) {
    for (long long j = 2; j * j < A[i]; ++j) {
      if (A[i] % j == 0) {
        if (amap[j] > 0) pairwise = false;
        arr.push_back(j);
        amap[j]++;
        bmap[i][j]++;
      }
      while (A[i] % j == 0) A[i] /= j;
    }
    if (A[i] > 1) {
      if (amap[A[i]] > 0) pairwise = false;
      arr.push_back(A[i]);
      amap[A[i]]++;
      bmap[i][A[i]]++;
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  bool setwise = true;
  bool tmpset;
  for (int i = 0; i < arr.size(); ++i) {
    tmpset = false;
    for (int j = 0; j < N; ++j) {
      if (bmap[j][arr[i]] == 0) tmpset = true;
    }
    if (!tmpset) setwise = false;
  }
  if (setwise)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
