#include <bits/stdc++.h>
using namespace std;
void st() { cout << "setwise coprime"; }
void pr() { cout << "pairwise coprime"; }
void no() { cout << "not coprime"; }
bool primechk[1000007];
std::vector<long long> v;
void preprocess(long long N) {
  long long i, j;
  for (i = 2; i <= N; i++) {
    primechk[i] = 1;
  }
  for (i = 2; i <= N; i++) {
    if (primechk[i]) {
      v.push_back(i);
    }
    if (primechk[i] == 1) {
      for (j = 2; i * j <= N; j++) {
        primechk[i * j] = 0;
      }
    }
  }
}
int main() {
  long long n, i, x, cnt, j, bb = 0;
  preprocess(1000004);
  cin >> n;
  long long arr[n + 5];
  for (i = 0; i < n; i++) {
    cin >> arr[i];
  }
  for (i = 0; i < v.size(); i++) {
    x = v[i];
    cnt = 0;
    for (j = 0; j < n; j++) {
      if (arr[j] % x == 0) {
        cnt++;
      }
    }
    if (cnt == n) {
      no();
      return 0;
    }
    if (cnt > 1) {
      bb = 1;
    }
  }
  if (bb) {
    st();
  } else {
    pr();
  }
  return 0;
}
