#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int M = 0;
  set<int> a;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    a.insert(x);
    M = max(M, x);
  }
  vector<int> c(M + 1, 0), d(M + 1, 0);
  vector<bool> is_prime(M + 1, true);
  is_prime[0] = 0;
  is_prime[1] = 0;
  for (int i = 2; i < M + 1; i++) {
    if (is_prime[i]) {
      int k = 1;
      while (i * k <= M) {
        is_prime[i * k] = 0;
        d[i * k] = i;
        k++;
      }
    }
  }
  for (int x : a) {
    if (x == 1) {
      c[x]++;
      continue;
    }
    while (x > 1) {
      c[x]++;
      x /= d[x];
    }
  }
  int cnt = 0;
  for (int x : c) {
    if (x == n) {
      cout << "not coprime" << endl;
      return 0;
    }
    cnt = max(cnt, x);
  }
  if (cnt > 1)
    cout << "setwise coprime" << endl;
  else
    cout << "pairwise coprime" << endl;
}
