#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;
  vector<long long> arr1;
  bool pairwise = true;
  long long tmp;
  for (int i = 0; i < N; ++i) {
    tmp = A[i];
    for (long long j = 2; j * j <= tmp; ++j) {
      if (tmp % j == 0) {
        if (amap[j] > 0) pairwise = false;
        if (i == 0) arr1.push_back(j);
        amap[j]++;
      }
      while (tmp % j == 0) tmp /= j;
    }
    if (tmp > 1) {
      if (amap[tmp] > 0) pairwise = false;
      if (i == 0) arr1.push_back(tmp);
      amap[tmp]++;
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  for (int i = 1; i < N; ++i) {
    vector<long long> arr2;
    for (int j = 0; j < arr1.size(); ++j) {
      if (A[i] % arr1[j] == 0) {
        arr2.push_back(arr1[j]);
      }
    }
    arr1 = arr2;
  }
  if (arr1.size() != 0)
    cout << "not coprime" << endl;
  else
    cout << "setwise coprime" << endl;
}
