#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int MAX = 1000;
const int INF = 1e9;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};
int gcd(int x, int y) {
  int r;
  while ((r = x % y) != 0) {
    x = y;
    y = r;
  }
  return y;
}
int main() {
  int N;
  cin >> N;
  vector<int> v;
  for (int i = 0; i < (N); i++) {
    int temp;
    cin >> temp;
    v.push_back(temp);
  }
  int ii, jj;
  for (ii = 0; ii < N; ii++) {
    for (jj = ii + 1; jj < N; jj++) {
      int ret = gcd(v[ii], v[jj]);
      if (ret != 1) break;
    }
    if (jj != N) {
      break;
    }
  }
  if (ii == N) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int tmp = v[0];
  for (int ii = 1; ii < N; ii++) {
    int ret = gcd(tmp, v[ii]);
    tmp = ret;
  }
  if (tmp == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
}
