#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
bool flag[1000001];
int exist[1000001];
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < (N); ++i) cin >> A[i];
  bool pairwise = true;
  bool setwise = true;
  for (int i = 0; i < (1000001); ++i) flag[i] = false;
  for (int i = 0; i < (1000001); ++i) exist[i] = 0;
  for (int i = 0; i < (N); ++i) ++exist[A[i]];
  for (int i = 2; i <= 100000; ++i) {
    int cnt = 0;
    if (!flag[i]) {
      for (int j = i * 2; j <= 1000001; j += i) {
        flag[j] = true;
        cnt += exist[j];
      }
    }
    if (cnt > 1) pairwise = false;
    if (cnt == N) setwise = false;
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (setwise) {
    cout << "setwise coprime" << endl;
  } else
    cout << "not coprime" << endl;
}
