#include <bits/stdc++.h>
using namespace std;
int flag[100010 + 100];
vector<int> prime;
int main() {
  flag[0] = 1;
  flag[1] = 1;
  int sq = sqrt(100010);
  for (int i = 2; i < sq; i++) {
    if (flag[i] == 0) {
      for (int j = i * i; j < 100010; j += i) {
        flag[j] = 1;
      }
    }
  }
  for (int i = 0; i < 100010; i++)
    if (flag[i] == 0) {
      prime.push_back(i);
    }
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  memset(flag, 0, sizeof(flag));
  for (int i = 0; i < n; i++) {
    int m = v[i];
    for (int j = 0; j < prime.size(); j++) {
      if (prime[j] > m) break;
      if (m % prime[j] == 0) {
        while (m % prime[j] == 0) {
          m /= prime[j];
        }
        flag[prime[j]]++;
        if (m == 1) break;
      }
    }
    if (m > 2) flag[m]++;
  }
  int pair_flag = 0;
  int set_flag = 0;
  for (int i = 0; i < 100010; i++) {
    if (flag[i] > 1) pair_flag = 1;
    if (flag[i] >= n) set_flag = 1;
  }
  if (!pair_flag) {
    cout << "pairwise coprime" << endl;
  } else if (!set_flag) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
