#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) {
  int r;
  if (x < y) swap(x, y);
  while (y > 0) {
    r = x % y;
    x = y;
    y = r;
  }
  return x;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A.at(i);
  int flag = 0;
  int check = A.at(0);
  for (int i = 0; i < N - 1; i++) {
    for (int j = i + 1; j < N; j++) {
      if (gcd(A.at(i), A.at(j)) != 1) flag = 1;
    }
    check = gcd(check, A.at(i + 1));
  }
  if (flag == 1 && check == 1) flag = 2;
  if (flag == 0) {
    cout << "pairwise coprime" << endl;
  } else if (flag == 1) {
    cout << "not coprime" << endl;
  } else if (flag == 2) {
    cout << "setwise coprime" << endl;
  }
}
