#include <bits/stdc++.h>
using namespace std;
vector<int> All(1001, 0);
vector<int> temp(1001, 0);
void primedivide(int num) {
  for (int i = 0; i < (1001); ++i) temp[i] = 0;
  for (int divnum = 2; divnum <= 1000; divnum++) {
    while (num % divnum == 0) {
      num /= divnum;
      temp[divnum]++;
    }
    if (num == 1) {
      break;
    }
  }
  for (int i = 0; i < (1001); ++i) {
    if (temp[i] > 0) {
      All[i]++;
    }
  }
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < (N); ++i) cin >> A[i];
  for (int i = 0; i < (N); ++i) {
    primedivide(A[i]);
  }
  for (int i = 0; i < (1001); ++i) {
    if (All[i] == N) {
      cout << "not coprime" << endl;
      return 0;
    }
  }
  for (int i = 0; i < (1001); ++i) {
    if (All[i] >= 2) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
